Add kill function for ZombieCmd
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package de.marc.advancedKill.commands;
|
||||
|
||||
import de.marc.advancedKill.AdvancedKill;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -24,6 +25,14 @@ public class ZombieCmd {
|
||||
zombie.getEquipment().setItemInMainHand(
|
||||
new ItemStack(Material.DIAMOND_SWORD)
|
||||
);
|
||||
|
||||
zombie.setCustomName("akill");
|
||||
zombie.setCustomNameVisible(false);
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||
zombie.remove();
|
||||
}, 200L);
|
||||
|
||||
sender.sendMessage("§aErfolg!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user