Dieser Commit ist enthalten in:
Ursprung
202e03c957
Commit
0bf27db398
@ -112,23 +112,21 @@ public class SmartPlaceListener implements Plain, Listener {
|
||||
}
|
||||
|
||||
private void run(Player player, Object packet, boolean first, boolean sneaking, boolean shouldSneak) {
|
||||
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
||||
if (sneaking) SMART_PLACING.add(player);
|
||||
player.setSneaking(shouldSneak || sneaking);
|
||||
try {
|
||||
packetExecutor.invoke(playerConnection.get(getHandle.invoke(player)), packet);
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
} finally {
|
||||
SMART_PLACING.remove(player);
|
||||
player.setSneaking(sneaking);
|
||||
}
|
||||
if (sneaking) SMART_PLACING.add(player);
|
||||
player.setSneaking(shouldSneak || sneaking);
|
||||
try {
|
||||
packetExecutor.invoke(playerConnection.get(getHandle.invoke(player)), packet);
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
} finally {
|
||||
SMART_PLACING.remove(player);
|
||||
player.setSneaking(sneaking);
|
||||
}
|
||||
|
||||
if (!WAS_EXECUTED.contains(player) && first) {
|
||||
run(player, packet, false, sneaking, shouldSneak);
|
||||
}
|
||||
WAS_EXECUTED.remove(player);
|
||||
}, first ? 0 : 1);
|
||||
if (!WAS_EXECUTED.contains(player) && first) {
|
||||
run(player, packet, false, sneaking, shouldSneak);
|
||||
}
|
||||
WAS_EXECUTED.remove(player);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren