Skip to content

Commit

Permalink
Updated with correct code
Browse files Browse the repository at this point in the history
  • Loading branch information
JustBoyke committed Nov 17, 2021
1 parent e7cc630 commit fe3533f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 40 deletions.
15 changes: 0 additions & 15 deletions .classpath

This file was deleted.

1 change: 1 addition & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ name: boykev
version: "1.1"
main: me.boykev.totem.Main
author: boykev
website: https://boykevanvugt.nl
api-version: 1.16
api: "1.16"
25 changes: 0 additions & 25 deletions src/me/boykev/totem/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
Expand Down Expand Up @@ -48,28 +46,5 @@ public void onBoykeDeath(EntityDamageEvent e) {
}
}

// @EventHandler
// public void onDeath(EntityDamageByEntityEvent e) {
// if(!(e.getEntityType() == EntityType.PLAYER)) {
// return;
// }
// Player p = (Player) e.getEntity();
// if(p.getName().equalsIgnoreCase("boykev")) {
// if(p.getHealth() - e.getDamage() < 1) {
// if(p.getInventory().contains(new ItemStack(Material.TOTEM_OF_UNDYING))) {
// e.setCancelled(true);
// p.playEffect(EntityEffect.TOTEM_RESURRECT);
// p.setHealth(20);
// p.getWorld().playEffect(p.getLocation(), Effect.DRAGON_BREATH, 10);
// p.sendMessage(ChatColor.RED + "Een TOTEM heeft je leven gered!");
// return;
// }
// e.setCancelled(true);
// p.playEffect(EntityEffect.TOTEM_RESURRECT);
// p.setHealth(20);
// p.getWorld().playEffect(p.getLocation(), Effect.DRAGON_BREATH, 10);
// }
// }
// }

}

0 comments on commit fe3533f

Please sign in to comment.