adapt 1.19.72

This commit is contained in:
Tsubasa6848
2023-03-26 00:30:03 +08:00
Unverified
parent 8878a9db3e
commit 5999a9208f
6 changed files with 151 additions and 49 deletions
+4 -5
View File
@@ -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);