mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-30 11:17:14 -05:00
Fix TNT physics overflow
This commit is contained in:
parent
6835013bef
commit
2e5eecf936
2 changed files with 14 additions and 2 deletions
|
@ -321,7 +321,7 @@ class EntitySpawn implements Listener {
|
|||
final double tps = Bukkit.getTPS()[0];
|
||||
|
||||
if (tps < 10) {
|
||||
event.setCancelled(true);
|
||||
event.getBlock().setType(Material.AIR, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,19 @@ class PlayerCommand implements Listener {
|
|||
return;
|
||||
}
|
||||
|
||||
if (("/minecraft:gamerule".equalsIgnoreCase(arr[0]) ||
|
||||
if (("/minecraft:execute".equals(arr[0].toLowerCase()) ||
|
||||
"/execute".equals(arr[0].toLowerCase())) &&
|
||||
arr.length >= 1) {
|
||||
final StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
for (int i = 1; i < arr.length; i++) {
|
||||
stringBuilder.append(arr[i] + " ");
|
||||
}
|
||||
if (stringBuilder.toString().toLowerCase().contains("execute") ||
|
||||
stringBuilder.toString().toLowerCase().contains("sudo")) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
} else if (("/minecraft:gamerule".equalsIgnoreCase(arr[0]) ||
|
||||
"/gamerule".equalsIgnoreCase(arr[0])) &&
|
||||
arr.length >= 3) {
|
||||
if ("randomTickSpeed".equalsIgnoreCase(arr[1]) &&
|
||||
|
|
Loading…
Reference in a new issue