REQ SemiGodmode

Discussion in 'Archived: Plugin Requests' started by Deleted user, Dec 10, 2011.

  1. Offline

    Deleted user

    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 :)
     
  2. Offline

    dbizzzle

  3. Offline

    DrAgonmoray

    "SemiGodmode"

    don't you mean.. DEMIGodMode?

    ahahahahaa!!
    u c wat i did thar?
     
  4. Offline

    Deleted user

    and what do i need? i only know
    Code:
    public void onEntityDamage(EntityDamageEvent event
    but this is for an hole Godmode
     
  5. Offline

    dbizzzle

    @xKoKSii If you plan on coding this yourself here's a start:

    Code:java
    1.  
    2. public void onEntityDamage(EntityDamageEvent event) {
    3. DamageCause damage = event.getCause();
    4. Player player = event.getPlayer();
    5. if (damage.equals(DamageCause.LAVA)) {
    6. if (semigod.contains(player)) { //semigod would be an arraylist you put the player into onCommand
    7. event.setCancelled(true);
    8. }
    9. }
    10. }
    11.  
     
  6. Offline

    Deleted user

    Thank you so verrrry much that was wat i need :) im new in java and C++ so its nice :)
     
  7. Offline

    dbizzzle

    @xKoKSii Just realized you wanted to do it with permission.

    Code:java
    1.  
    2. public void onEntityDamage(EntityDamageEvent event) {
    3. DamageCause damage = event.getCause();
    4. Player player = event.getPlayer();
    5. if (damage.equals(DamageCause.LAVA)) {
    6. if (player.hasPermission("nodamage.lava")) {
    7. event.setCancelled(true);
    8. }
    9. }
    10. }
    11. }
    12.  
     
  8. Offline

    Deleted user

    @dbizzzle
    Iwant to do it with permissions and an Toggle >Command :) on/off
     
  9. Offline

    dbizzzle

    @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
     

Share This Page