adapt 1.19.72
This commit is contained in:
Vendored
+99
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.inc": "cpp",
|
||||
"string": "cpp",
|
||||
"array": "cpp",
|
||||
"bitset": "cpp",
|
||||
"deque": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"list": "cpp",
|
||||
"queue": "cpp",
|
||||
"random": "cpp",
|
||||
"ranges": "cpp",
|
||||
"regex": "cpp",
|
||||
"span": "cpp",
|
||||
"stack": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"valarray": "cpp",
|
||||
"vector": "cpp",
|
||||
"xhash": "cpp",
|
||||
"xstring": "cpp",
|
||||
"xtree": "cpp",
|
||||
"xutility": "cpp",
|
||||
"multi_span": "cpp",
|
||||
"string_span": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"atomic": "cpp",
|
||||
"bit": "cpp",
|
||||
"cctype": "cpp",
|
||||
"charconv": "cpp",
|
||||
"chrono": "cpp",
|
||||
"cinttypes": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"codecvt": "cpp",
|
||||
"compare": "cpp",
|
||||
"concepts": "cpp",
|
||||
"condition_variable": "cpp",
|
||||
"csignal": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cuchar": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"exception": "cpp",
|
||||
"filesystem": "cpp",
|
||||
"format": "cpp",
|
||||
"forward_list": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"future": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"ios": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"iterator": "cpp",
|
||||
"limits": "cpp",
|
||||
"locale": "cpp",
|
||||
"map": "cpp",
|
||||
"memory": "cpp",
|
||||
"mutex": "cpp",
|
||||
"new": "cpp",
|
||||
"numeric": "cpp",
|
||||
"optional": "cpp",
|
||||
"ostream": "cpp",
|
||||
"ratio": "cpp",
|
||||
"set": "cpp",
|
||||
"shared_mutex": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"stop_token": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"system_error": "cpp",
|
||||
"thread": "cpp",
|
||||
"tuple": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"utility": "cpp",
|
||||
"variant": "cpp",
|
||||
"xfacet": "cpp",
|
||||
"xiosbase": "cpp",
|
||||
"xlocale": "cpp",
|
||||
"xlocbuf": "cpp",
|
||||
"xlocinfo": "cpp",
|
||||
"xlocmes": "cpp",
|
||||
"xlocmon": "cpp",
|
||||
"xlocnum": "cpp",
|
||||
"xloctime": "cpp",
|
||||
"xmemory": "cpp",
|
||||
"xstddef": "cpp",
|
||||
"xtr1common": "cpp",
|
||||
"pointers": "cpp"
|
||||
}
|
||||
}
|
||||
-1
Submodule SDK deleted from e69dbb19df
+36
-29
@@ -146,71 +146,76 @@ void CleanerMain(){
|
||||
}
|
||||
}
|
||||
ifautoclean = true;
|
||||
LoadLanguageFromJson(LanguageFile);
|
||||
if(Settings::sendbroadcast == true){
|
||||
Level::broadcastText(before + ReplaceStr(output4,"{0}",std::to_string(k)),TextType::RAW);
|
||||
auto opt = output4;
|
||||
ReplaceStr(opt, "{0}", std::to_string(k));
|
||||
if (Settings::sendbroadcast == true) {
|
||||
Level::broadcastText(before + opt, TextType::RAW);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
if (Settings::sendtoast == true) {
|
||||
auto players = Level::getAllPlayers();
|
||||
if(players.size() >= 1){
|
||||
for(int tg = 0; tg <= players.size()-1; tg++){
|
||||
players[tg]->sendToastPacket(notice,before + ReplaceStr(output4,"{0}",std::to_string(k)));
|
||||
players[tg]->sendToastPacket(notice,before + opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Settings::logtoconsole == true){
|
||||
logger.info(ReplaceStr(output4,"{0}",std::to_string(k)));
|
||||
if (Settings::logtoconsole == true) {
|
||||
logger.info(opt);
|
||||
}
|
||||
}
|
||||
else{
|
||||
LoadLanguageFromJson(LanguageFile);
|
||||
auto opt = output4;
|
||||
ReplaceStr(opt, "{0}", "0");
|
||||
if(Settings::sendbroadcast == true){
|
||||
Level::broadcastText(before + ReplaceStr(output4,"{0}","0"),TextType::RAW);
|
||||
Level::broadcastText(before + opt, TextType::RAW);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
auto players = Level::getAllPlayers();
|
||||
if(players.size() >= 1){
|
||||
for(int tg = 0; tg <= players.size()-1; tg++){
|
||||
players[tg]->sendToastPacket(notice,before + ReplaceStr(output4,"{0}","0"));
|
||||
players[tg]->sendToastPacket(notice,before + opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Settings::logtoconsole == true){
|
||||
logger.info(ReplaceStr(output4,"{0}","0"));
|
||||
logger.info(opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Count1(){
|
||||
auto opt = output02;
|
||||
ReplaceStr(opt,"{0}",std::to_string(pre2));
|
||||
if(Settings::sendbroadcast == true){
|
||||
Level::broadcastText(before + ReplaceStr(output02,"{0}",std::to_string(pre2)),TextType::RAW);
|
||||
Level::broadcastText(before + opt, TextType::RAW);
|
||||
}
|
||||
if(Settings::logtoconsole == true){
|
||||
logger.info(ReplaceStr(output02,"{0}",std::to_string(pre2)));
|
||||
logger.info(opt);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
auto players = Level::getAllPlayers();
|
||||
if(players.size() >= 1){
|
||||
for(int tga = 0; tga <= players.size()-1; tga++){
|
||||
players[tga]->sendToastPacket(notice,before + ReplaceStr(output02,"{0}",std::to_string(pre2)));
|
||||
players[tga]->sendToastPacket(notice,before + opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _CleanerMain(){
|
||||
LoadLanguageFromJson(LanguageFile);
|
||||
if(Settings::sendbroadcast == true){
|
||||
Level::broadcastText(before + ReplaceStr(output01,"{0}",std::to_string(pre1)),TextType::RAW);
|
||||
auto opt = output01;
|
||||
ReplaceStr(opt,"{0}", std::to_string(pre1));
|
||||
if (Settings::sendbroadcast == true) {
|
||||
Level::broadcastText(before + opt, TextType::RAW);
|
||||
}
|
||||
if(Settings::logtoconsole == true){
|
||||
logger.info(ReplaceStr(output01,"{0}",std::to_string(pre1)));
|
||||
if (Settings::logtoconsole == true) {
|
||||
logger.info(opt);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
if (Settings::sendtoast == true) {
|
||||
auto players = Level::getAllPlayers();
|
||||
if(players.size() >= 1){
|
||||
for(int tg = 0; tg <= players.size()-1; tg++){
|
||||
players[tg]->sendToastPacket(notice,before + ReplaceStr(output01,"{0}",std::to_string(pre1)));
|
||||
players[tg]->sendToastPacket(notice,before + opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,18 +354,19 @@ void _AutoClean() {
|
||||
}
|
||||
if (j >= Settings::triggercount) {
|
||||
ifautoclean = false;
|
||||
LoadLanguageFromJson(LanguageFile);
|
||||
auto opt = trigger1;
|
||||
ReplaceStr(opt,"{0}", std::to_string(j));
|
||||
if(Settings::logtoconsole == true){
|
||||
logger.warn(ReplaceStr(trigger1,"{0}",std::to_string(j)));
|
||||
logger.warn(opt);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
auto players = Level::getAllPlayers();
|
||||
for(int tg = 0; tg <= players.size()-1; tg++){
|
||||
players[tg]->sendToastPacket(notice,before + ReplaceStr(trigger1,"{0}",std::to_string(j)));
|
||||
players[tg]->sendToastPacket(notice,before + opt);
|
||||
}
|
||||
}
|
||||
if(Settings::sendbroadcast == true){
|
||||
Level::broadcastText(before + ReplaceStr(trigger1,"{0}",std::to_string(j)),TextType::RAW);
|
||||
Level::broadcastText(before + opt, TextType::RAW);
|
||||
}
|
||||
_CleanerMain();
|
||||
}
|
||||
@@ -379,18 +385,19 @@ void AutoClean(){
|
||||
void TPSClean(){
|
||||
Schedule::repeat([]{
|
||||
if(enabletpsclean == true && Tick_per_minute <= triggertps){
|
||||
LoadLanguageFromJson(LanguageFile);
|
||||
auto opt = triggertpsclean;
|
||||
ReplaceStr(opt,"{0}", std::to_string(Tick_per_minute));
|
||||
if(Settings::logtoconsole == true){
|
||||
logger.warn(ReplaceStr(triggertpsclean,"{0}",std::to_string(Tick_per_minute)));
|
||||
logger.warn(opt);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
auto players = Level::getAllPlayers();
|
||||
for(int tg = 0; tg <= players.size()-1; tg++){
|
||||
players[tg]->sendToastPacket(notice,before + ReplaceStr(triggertpsclean,"{0}",std::to_string(Tick_per_minute)));
|
||||
players[tg]->sendToastPacket(notice,before + opt);
|
||||
}
|
||||
}
|
||||
if(Settings::sendbroadcast == true){
|
||||
Level::broadcastText(before + ReplaceStr(triggertpsclean,"{0}",std::to_string(Tick_per_minute)),TextType::RAW);
|
||||
Level::broadcastText(before + opt, TextType::RAW);
|
||||
}
|
||||
_CleanerMain();
|
||||
}
|
||||
|
||||
+10
-12
@@ -3,7 +3,6 @@
|
||||
#include "setting.h"
|
||||
#include <llapi/mc/Player.hpp>
|
||||
#include <llapi/mc/Level.hpp>
|
||||
|
||||
using namespace LanguageSettings;
|
||||
using namespace Form;
|
||||
|
||||
@@ -12,14 +11,13 @@ string finished;
|
||||
extern bool checkcanvote;
|
||||
extern bool checktimeout;
|
||||
extern int ac_count;
|
||||
|
||||
extern string before;
|
||||
|
||||
extern void _CleanerMain();
|
||||
|
||||
void ConfirmForm(Player* player){
|
||||
ModalForm form(guitit, reask, reok, reno);
|
||||
form.sendTo(player, [](Player* player, bool isConfirm){
|
||||
ModalForm form(guitit, reask, reok, reno);
|
||||
form.sendTo(player, [](Player* player, bool isConfirm){
|
||||
if(isConfirm){
|
||||
if(checktimeout = true){
|
||||
ac_count++;
|
||||
@@ -30,7 +28,7 @@ void ConfirmForm(Player* player){
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(checktimeout = true){
|
||||
if (checktimeout = true) {
|
||||
player->sendText(rede);
|
||||
}
|
||||
else{
|
||||
@@ -54,22 +52,22 @@ void VoteForm(Player* player){
|
||||
checkcanvote = false;
|
||||
Schedule::delay([]{
|
||||
checkcanvote = true;
|
||||
},20*Settings::cd);
|
||||
}, 20*Settings::cd);
|
||||
Schedule::delay([]{
|
||||
auto all = Global<Level>->getAllPlayers().size();
|
||||
int caculate = 100*ac_count/all;
|
||||
checktimeout = false;
|
||||
if(caculate >= Settings::percentage){
|
||||
Global<Level>->broadcastText(before + votesuccess,TextType::RAW);
|
||||
if (caculate >= Settings::percentage) {
|
||||
Level::broadcastText(before + votesuccess, TextType::RAW);
|
||||
_CleanerMain();
|
||||
}
|
||||
else{
|
||||
Global<Level>->broadcastText(before + votefail,TextType::RAW);
|
||||
else {
|
||||
Level::broadcastText(before + votefail, TextType::RAW);
|
||||
}
|
||||
},20*Settings::votedelay);
|
||||
}, 20*Settings::votedelay);
|
||||
}
|
||||
else{
|
||||
player->sendText(sendcancel);
|
||||
player->sendText(sendcancel, TextType::RAW);
|
||||
}
|
||||
});
|
||||
}
|
||||
+4
-5
@@ -47,14 +47,14 @@ void RegCleanCommand(){
|
||||
auto command = DynamicCommand::createCommand(Settings::cleancommand, cmdclean + endstr, CommandPermissionLevel::GameMasters, { (CommandFlagValue)0x80 }, { (CommandFlagValue)1 });
|
||||
command->addOverload();
|
||||
command->setCallback([](DynamicCommand const& command, CommandOrigin const& origin, CommandOutput& output, std::unordered_map<std::string, DynamicCommand::Result>& results) {
|
||||
if(Settings::sendbroadcast == true){
|
||||
Global<Level>->broadcastText(before + opclean,TextType::RAW);
|
||||
if (Settings::sendbroadcast == true) {
|
||||
Level::broadcastText(before + opclean, TextType::RAW);
|
||||
}
|
||||
if(Settings::sendtoast == true){
|
||||
if (Settings::sendtoast == true) {
|
||||
auto players = Global<Level>->getAllPlayers();
|
||||
if(players.size() >= 1){
|
||||
for(int tg = 0; tg <= players.size()-1; tg++){
|
||||
players[tg]->sendToastPacket(notice,before + opclean);
|
||||
players[tg]->sendToastPacket(notice, before + opclean);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,6 @@ void RegDespawnCommand(){
|
||||
ens[i]->despawn();
|
||||
}
|
||||
LoadLanguageFromJson(LanguageFile);
|
||||
|
||||
return output.success(ReplaceStr(despawnsuccess,"{0}",std::to_string(ens.size())));
|
||||
}
|
||||
else return output.error(notarget);
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@
|
||||
#define PLUGIN_AUTHOR "Tsubasa6848"
|
||||
#define PLUGIN_VERSION_MAJOR 1
|
||||
#define PLUGIN_VERSION_MINOR 6
|
||||
#define PLUGIN_VERSION_REVISION 10
|
||||
#define PLUGIN_VERSION_REVISION 21
|
||||
#define PLUGIN_VERSION_BUILD 0
|
||||
#define TARGET_BDS_PROTOCOL_VERSION 568
|
||||
#define TARGET_BDS_PROTOCOL_VERSION 575
|
||||
#define __TO_VERSION_STRING(ver) #ver
|
||||
#define TO_VERSION_STRING(ver) __TO_VERSION_STRING(ver)
|
||||
#define PLUGIN_LLVERSION_STATUS ll::Version::Release
|
||||
|
||||
Reference in New Issue
Block a user