Block certain mobs in certain world

Discussion in 'Plugin Development' started by MarckF, Aug 7, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    MarckF

    Hey everyone, what Im trying to do is to block Wither skeletons spawning. But I have done so far is this:

    http://pastebin.com/jerPM1Wy

    I think is not really difficult, what I dont know how to do is how to "set the creature"(Wither skeletons).

    please, some help?
     
  2. Try doing this:
    Code:
    @EventHandler
        public void onCreatureSpawn(CreatureSpawnEvent event) {
            if (event.getLocation().getWorld().getEnvironment().equals(World.Environment.NETHER)) {
                if (event.getEntity() instanceof Skeleton && ((Skeleton) event.getEntity()).getSkeletonType() == Skeleton.SkeletonType.WITHER) event.setCancelled(true);
            }
        }
     
Thread Status:
Not open for further replies.

Share This Page