mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
Fix
This commit is contained in:
@@ -150,9 +150,9 @@
|
||||
+ this.cserver.getPluginManager().callEvent(event);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+ // Paper
|
||||
+ // Paper start - PlayerToggleSneakEvent
|
||||
+ net.minecraft.world.entity.player.Input lastInput = this.player.getLastClientInput();
|
||||
+ boolean shiftKeyDown =packet.input().shift();
|
||||
+ boolean shiftKeyDown = packet.input().shift();
|
||||
+ if (lastInput.shift() != packet.input().shift()) {
|
||||
+ // Has sneak changed
|
||||
+ org.bukkit.event.player.PlayerToggleSneakEvent event = new org.bukkit.event.player.PlayerToggleSneakEvent(this.getCraftPlayer(), packet.input().shift());
|
||||
@@ -163,7 +163,7 @@
|
||||
+ shiftKeyDown = this.player.isShiftKeyDown();
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - PlayerToggleSneakEvent
|
||||
this.player.setLastClientInput(packet.input());
|
||||
if (this.player.hasClientLoaded()) {
|
||||
this.player.resetLastActionTime();
|
||||
|
Reference in New Issue
Block a user