Hi! I have a little question about the MobSpawner block. How can we get it to spawn Mobs. The way I tried: (in onBlockRightClick) Code: ((MobSpawner)block.getState()).setMobType(MobType.PIG); ((MobSpawner)block.getState()).setDelay(5);
you want it to spit out a mob every time you right click it? --- merged: Feb 10, 2011 4:16 AM --- If that is what you want i would suggest maybe making it a sign control or something, MobSpawners are full of functionality that will make it difficult for you to make it act right. but in order to catch the right click of any block (sign included) use the BlockInteractEvent you can find details on the Bukkit Javadocs
hey! thanks for the quick reply! I want to be able to place mobSpawners in the world. But if I use /give command and give myself a spawner it doesn't spawn anything. So I had the idea the create a plugin to change the delay and mobtype but it doesn't seem to work.
might want to look at http://forums.bukkit.org/threads/admn-spawnmob-v1-4-1.1707/ once you place a mob spawner on the ground...look at it and type /mspawn Zombie for example
Yup I saw that one but it's not working anymore since the onCommand change I guess. I looked at the source code and it's using some craftbukkit classes that I'm not familiar with. I could give it a shot to update it, but I'd prefer creating my own stuff.