more compile fixes
This commit is contained in:
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start - extend PlayerGameModeChangeEvent
|
||||
+ org.bukkit.event.player.PlayerGameModeChangeEvent event = serverPlayer.setGameMode(gameType, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, net.kyori.adventure.text.Component.empty());
|
||||
+ if (event != null && event.isCancelled()) {
|
||||
+ source.sendSuccess(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.cancelMessage()), false);
|
||||
+ source.sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(event.cancelMessage()), false);
|
||||
}
|
||||
+ // Paper end
|
||||
+ ++i;
|
||||
@@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
logGamemodeChange(context.getSource(), serverPlayer, gameMode);
|
||||
++i;
|
||||
+ } else if (event != null && event.cancelMessage() != null) {
|
||||
+ context.getSource().sendSuccess(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.cancelMessage()), true);
|
||||
+ context.getSource().sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(event.cancelMessage()), true);
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user