Fixed grace period
This commit is contained in:
parent
c70e5d500f
commit
563e453a26
Binary file not shown.
@ -8,6 +8,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
|
||||
public class PvP implements Listener {
|
||||
public Main plugin;
|
||||
@ -63,4 +64,12 @@ public class PvP implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
@EventHandler
|
||||
public void PlayerDamage(EntityDamageEvent event){
|
||||
Entity e = event.getEntity();
|
||||
if(e instanceof Player){
|
||||
if(plugin.gp!= 0)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user