SHARE
TWEET

Untitled

a guest Jul 17th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // AUTHOR: Austin_Powers_CE
  2. // DATE: 25/01/2001
  3. // DESCRIPTION: --
  4. // VERSION: 0.1
  5.  
  6. public class MobListener extends PluginListener {
  7.     // We will create a variable to check if we spawn a mob or not called
  8.     // "IgnoreSpawn"
  9.    
  10.     private boolean IgnoreSpawn;
  11.    
  12. public boolean onMobSpawn() {
  13.     // Now, we are checking if IgnoreSpawn is true or false. If false
  14.     // the mob will spawn
  15.     if (IgnoreSpawn == false) {
  16.     // If IgnoreSpawn == false, then, the mob will appear
  17.         IgnoreSpawn = true;
  18.         return false;
  19.     } else {
  20.         return true;
  21.     }
  22.  }
  23. public boolean onCommand(Player player, String command) {
  24.      if (command.equalsIgnoreCase("/MobSpawn")) {
  25.          Mob SpiderPig = new Mob("Spider");
  26.          IgnoreSpawn = false;
  27.          SpiderPig.spawn();
  28.      }
  29.     return false;
  30.  }
  31. }
RAW Paste Data
Top