Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // AUTHOR: Austin_Powers_CE
- // DATE: 25/01/2001
- // DESCRIPTION: --
- // VERSION: 0.1
- public class MobListener extends PluginListener {
- // We will create a variable to check if we spawn a mob or not called
- // "IgnoreSpawn"
- private boolean IgnoreSpawn;
- public boolean onMobSpawn() {
- // Now, we are checking if IgnoreSpawn is true or false. If false
- // the mob will spawn
- if (IgnoreSpawn == false) {
- // If IgnoreSpawn == false, then, the mob will appear
- IgnoreSpawn = true;
- return false;
- } else {
- return true;
- }
- }
- public boolean onCommand(Player player, String command) {
- if (command.equalsIgnoreCase("/MobSpawn")) {
- Mob SpiderPig = new Mob("Spider");
- IgnoreSpawn = false;
- SpiderPig.spawn();
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement