mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-06 11:24:39 +08:00
New Permission: essentials.god.pvp
Unless you have this permission you will be unable to attack other players while in god mode.
This commit is contained in:
parent
e502a7e6fd
commit
b1b09ea542
@ -47,6 +47,11 @@ public class EssentialsEntityListener implements Listener
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (attacker.isGodModeEnabled() && !attacker.isAuthorized("essentials.god.pvp"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
attacker.updateActivity(true);
|
||||
final List<String> commandList = attacker.getPowertool(attacker.getItemInHand());
|
||||
if (commandList != null && !commandList.isEmpty())
|
||||
|
Loading…
Reference in New Issue
Block a user