Skip to content

Commit 8b047da

Browse files
WillowSauceRWillowSauceR
WillowSauceR
authored and
WillowSauceR
committed
fix: fix LiteLDev#1194
1 parent ca5d015 commit 8b047da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ScriptEngine/src/api/PlayerAPI.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <llapi/mc/SynchedActorDataEntityWrapper.hpp>
3636
#include <llapi/PlayerInfoAPI.h>
3737
#include <llapi/mc/Biome.hpp>
38+
#include <llapi/mc/UpdateAbilitiesPacket.hpp>
3839
#include "main/SafeGuardRecord.h"
3940
#include <string>
4041
#include <vector>
@@ -1267,6 +1268,8 @@ Local<Value> PlayerClass::setPermLevel(const Arguments& args) {
12671268
RecordOperation(ENGINE_OWN_DATA()->pluginName, "Set Permission Level",
12681269
fmt::format("Set Player {} Permission Level as {}.", player->getRealName(), newPerm));
12691270
player->setPermissions((CommandPermissionLevel)newPerm);
1271+
UpdateAbilitiesPacket pkt(player->getUniqueID(), player->getAbilities());
1272+
player->sendNetworkPacket(pkt);
12701273
res = true;
12711274
}
12721275
return Boolean::newBoolean(res);

0 commit comments

Comments
 (0)