SkyeDarkhawk

RainMaker.java for B6

May 4th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.03 KB | None | 0 0
  1.  
  2.  
  3. public class RainMaker extends Plugin
  4. {
  5.   private final RainMaker.WeatherCaller listener;
  6.  
  7.  
  8.   public RainMaker()
  9.   {
  10.     this.listener = new RainMaker.WeatherCaller();
  11.  
  12.   }
  13.  
  14.   public void enable()
  15.   {
  16.   }
  17.  
  18.   public void disable()
  19.   {
  20.   }
  21.  
  22.   public void initialize() {
  23.     etc.getLoader().addListener(PluginLoader.Hook.COMMAND, this.listener, this, PluginListener.Priority.MEDIUM);
  24.   }
  25.  
  26.   public class WeatherCaller extends PluginListener
  27.   {
  28.    
  29.    
  30.     public boolean onCommand(Player player, String[] split) {
  31.         if ((split[0].equalsIgnoreCase("/raindance")) && (player.canUseCommand("/raindance")) && player.isAdmin()){
  32.             if (etc.getServer().getRaining())
  33.                 etc.getServer().messageAll("§d[Server got bitchslapped by and admin and stopped crying.]");
  34.             else
  35.                 etc.getServer().messageAll("§d[Server started to cry.]");
  36.             etc.getServer().setRain(!etc.getServer().getRaining());
  37.             return true;
  38.       }
  39.       return false;
  40.     }
  41.   }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment