From 6e0e0e8ae9af64e74a7747c60aaca26e7db655df Mon Sep 17 00:00:00 2001 From: CDAGaming Date: Mon, 5 Sep 2022 15:30:12 -0500 Subject: [PATCH] Forge 1.19.2 (#3477) --- forge/gradle.properties | 4 ++-- .../java/me/lucko/luckperms/forge/ForgeSenderFactory.java | 4 +++- .../luckperms/forge/capabilities/UserCapabilityListener.java | 2 +- .../lucko/luckperms/forge/context/ForgePlayerCalculator.java | 4 ++-- .../luckperms/forge/listeners/ForgeConnectionListener.java | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/forge/gradle.properties b/forge/gradle.properties index b60b42824..0defba33d 100644 --- a/forge/gradle.properties +++ b/forge/gradle.properties @@ -1,2 +1,2 @@ -minecraftVersion=1.19 -forgeVersion=41.0.19 \ No newline at end of file +minecraftVersion=1.19.2 +forgeVersion=43.0.3 \ No newline at end of file diff --git a/forge/src/main/java/me/lucko/luckperms/forge/ForgeSenderFactory.java b/forge/src/main/java/me/lucko/luckperms/forge/ForgeSenderFactory.java index d6a364037..e2c728f6b 100644 --- a/forge/src/main/java/me/lucko/luckperms/forge/ForgeSenderFactory.java +++ b/forge/src/main/java/me/lucko/luckperms/forge/ForgeSenderFactory.java @@ -25,6 +25,7 @@ package me.lucko.luckperms.forge; +import com.mojang.brigadier.ParseResults; import me.lucko.luckperms.common.cacheddata.result.TristateResult; import me.lucko.luckperms.common.locale.TranslationManager; import me.lucko.luckperms.common.query.QueryOptionsImpl; @@ -101,7 +102,8 @@ public class ForgeSenderFactory extends SenderFactory results = sender.getServer().getCommands().getDispatcher().parse(command, sender); + sender.getServer().getCommands().performCommand(results, command); } @Override diff --git a/forge/src/main/java/me/lucko/luckperms/forge/capabilities/UserCapabilityListener.java b/forge/src/main/java/me/lucko/luckperms/forge/capabilities/UserCapabilityListener.java index 76519cd33..a0c7015b8 100644 --- a/forge/src/main/java/me/lucko/luckperms/forge/capabilities/UserCapabilityListener.java +++ b/forge/src/main/java/me/lucko/luckperms/forge/capabilities/UserCapabilityListener.java @@ -59,7 +59,7 @@ public class UserCapabilityListener { @SubscribeEvent public void onPlayerClone(PlayerEvent.Clone event) { Player previousPlayer = event.getOriginal(); - Player currentPlayer = event.getPlayer(); + Player currentPlayer = event.getEntity(); previousPlayer.reviveCaps(); try { diff --git a/forge/src/main/java/me/lucko/luckperms/forge/context/ForgePlayerCalculator.java b/forge/src/main/java/me/lucko/luckperms/forge/context/ForgePlayerCalculator.java index 61c86cd29..400b0f933 100644 --- a/forge/src/main/java/me/lucko/luckperms/forge/context/ForgePlayerCalculator.java +++ b/forge/src/main/java/me/lucko/luckperms/forge/context/ForgePlayerCalculator.java @@ -134,7 +134,7 @@ public class ForgePlayerCalculator implements ContextCalculator { return; } - this.plugin.getContextManager().signalContextUpdate((ServerPlayer) event.getPlayer()); + this.plugin.getContextManager().signalContextUpdate((ServerPlayer) event.getEntity()); } @SubscribeEvent @@ -143,7 +143,7 @@ public class ForgePlayerCalculator implements ContextCalculator { return; } - this.plugin.getContextManager().signalContextUpdate((ServerPlayer) event.getPlayer()); + this.plugin.getContextManager().signalContextUpdate((ServerPlayer) event.getEntity()); } } diff --git a/forge/src/main/java/me/lucko/luckperms/forge/listeners/ForgeConnectionListener.java b/forge/src/main/java/me/lucko/luckperms/forge/listeners/ForgeConnectionListener.java index 09f13de22..2cd283097 100644 --- a/forge/src/main/java/me/lucko/luckperms/forge/listeners/ForgeConnectionListener.java +++ b/forge/src/main/java/me/lucko/luckperms/forge/listeners/ForgeConnectionListener.java @@ -103,7 +103,7 @@ public class ForgeConnectionListener extends AbstractConnectionListener { @SubscribeEvent(priority = EventPriority.HIGHEST) public void onPlayerLoadFromFile(PlayerEvent.LoadFromFile event) { - ServerPlayer player = (ServerPlayer) event.getPlayer(); + ServerPlayer player = (ServerPlayer) event.getEntity(); GameProfile profile = player.getGameProfile(); if (this.plugin.getConfiguration().get(ConfigKeys.DEBUG_LOGINS)) { @@ -137,7 +137,7 @@ public class ForgeConnectionListener extends AbstractConnectionListener { @SubscribeEvent(priority = EventPriority.LOWEST) public void onPlayerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) { - ServerPlayer player = (ServerPlayer) event.getPlayer(); + ServerPlayer player = (ServerPlayer) event.getEntity(); handleDisconnect(player.getGameProfile().getId()); }