Hey is it possible to create an Plugin thats only protect Lava damage of one player with an Permission? if its so please create me one
and what do i need? i only know Code: public void onEntityDamage(EntityDamageEvent event but this is for an hole Godmode
@xKoKSii If you plan on coding this yourself here's a start: Code:java public void onEntityDamage(EntityDamageEvent event) { DamageCause damage = event.getCause(); Player player = event.getPlayer(); if (damage.equals(DamageCause.LAVA)) { if (semigod.contains(player)) { //semigod would be an arraylist you put the player into onCommand event.setCancelled(true); } }}
@xKoKSii Just realized you wanted to do it with permission. Code:java public void onEntityDamage(EntityDamageEvent event) { DamageCause damage = event.getCause(); Player player = event.getPlayer(); if (damage.equals(DamageCause.LAVA)) { if (player.hasPermission("nodamage.lava")) { event.setCancelled(true); } } }}
@xKoKSii Then you would want the permission node within your command rather than in the onEntityDamage event (use my first example). If you need any other help you can just add me on skype: dbizzzle