Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (args[0].equalsIgnoreCase("create"))
- {
- if ((sender instanceof Player))
- {
- Player p = (Player)sender;
- if (p.isOp())
- {
- Location loc = p.getLocation();
- LivingEntity entity = (LivingEntity)loc.getWorld().spawnEntity(loc, EntityType.PIG_ZOMBIE);
- String name = getConfig().getString("mob.name");
- entity.setCustomName(name.replaceAll("&", "§"));
- entity.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 2147483647, 1000));
- entity.setMaxHealth(1.7976931348623157E+308D);
- }
- else
- {
- sender.sendMessage("§cYou don't have permission for this command!");
- }
- }
- else
- {
- sender.sendMessage("You can't do this from console!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement