add allow-creative

This commit is contained in:
hyperdefined
2025-05-07 17:58:44 -04:00
parent b2ef154cc6
commit 6d6f1aab8a
9 changed files with 12 additions and 9 deletions

View File

@@ -156,7 +156,7 @@ public class EntityDamage implements Listener {
// player is taking damage
if (mobBeingAttacked instanceof Player playerTakingDamage) {
if (playerTakingDamage.getGameMode() == GameMode.CREATIVE || playerTakingDamage.getGameMode() == GameMode.SPECTATOR) {
if (playerTakingDamage.getGameMode() == GameMode.CREATIVE && !toolStats.config.getBoolean("allow-creative")) {
return;
}
updateArmorDamage(playerTakingDamage.getInventory(), event.getFinalDamage());