Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2509,7 +2509,7 @@
if (this.player.isModelPartShown(PlayerModelPart.HAT) != isModelPartShown) {
this.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_HAT, this.player));
}
@@ -2003,7 +_,7 @@
@@ -2003,21 +_,21 @@
packet.difficulty().getDisplayName()
);
} else {
Expand All @@ -2518,7 +2518,14 @@
}
}

@@ -2017,7 +_,7 @@
@Override
public void handleChangeGameMode(ServerboundChangeGameModePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
- if (!GameModeCommand.PERMISSION_CHECK.check(this.player.permissions())) {
+ if (!GameModeCommand.PERMISSION_CHECK.check(this.player.permissions()) && !this.player.getBukkitEntity().hasPermission("minecraft.command.gamemode")) { // Paper - add permission check
LOGGER.warn(
"Player {} tried to change game mode to {} without required permissions",
this.player.getGameProfile().name(),
packet.mode().getShortDisplayName().getString()
);
} else {
Expand Down
Loading