Fix CancelPacketHandleException in SmartPlaceListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
ec10b0fe71
Commit
2cfed8b84d
@ -103,9 +103,14 @@ public class SmartPlaceListener implements Plain, Listener {
|
|||||||
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
||||||
if (sneaking) SMART_PLACING.add(player);
|
if (sneaking) SMART_PLACING.add(player);
|
||||||
player.setSneaking(shouldSneak || sneaking);
|
player.setSneaking(shouldSneak || sneaking);
|
||||||
|
try {
|
||||||
packetExecutor.invoke(playerConnection.get(getHandle.invoke(player)), packet);
|
packetExecutor.invoke(playerConnection.get(getHandle.invoke(player)), packet);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return;
|
||||||
|
} finally {
|
||||||
SMART_PLACING.remove(player);
|
SMART_PLACING.remove(player);
|
||||||
player.setSneaking(sneaking);
|
player.setSneaking(sneaking);
|
||||||
|
}
|
||||||
|
|
||||||
if (!WAS_EXECUTED.contains(player) && first) {
|
if (!WAS_EXECUTED.contains(player) && first) {
|
||||||
run(player, packet, false, sneaking, shouldSneak);
|
run(player, packet, false, sneaking, shouldSneak);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren