nicatronTg

Shank

Jan 31st, 2011
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.69 KB | None | 0 0
  1. public class Basic extends JavaPlugin {
  2.     private final BasicPlayerListener playerListener = new BasicPlayerListener(this);
  3.     private final BasicBlockListener blockListener = new BasicBlockListener(this);
  4.     private final HashMap<Player, Boolean> debugees = new HashMap<Player, Boolean>();
  5.  
  6.     public Basic(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File folder, File plugin, ClassLoader cLoader) {
  7.         super(pluginLoader, instance, desc, folder, plugin, cLoader);
  8.         // TODO: Place any custom initialization code here
  9.  
  10.         // NOTE: Event registration should be done in onEnable not here as all events are unregistered when a plugin is disabled
  11.     }
  12.  
  13.     public void onEnable() {
  14.         // TODO: Place any custom enable code here including the registration of any events
  15.  
  16.         // Register our events
  17.         PluginManager pm = getServer().getPluginManager();
  18.  
  19.         // EXAMPLE: Custom code, here we just output some info so we can check all is well
  20.         PluginDescriptionFile pdfFile = this.getDescription();
  21.         System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is now running." );
  22.     }
  23.     public void onCommand() {
  24.        
  25.     }
  26.     public void onDisable() {
  27.         // TODO: Place any custom disable code here
  28.  
  29.         // NOTE: All registered events are automatically unregistered when a plugin is disabled
  30.     }
  31.    
  32.     public boolean isDebugging(final Player player) {
  33.         if (debugees.containsKey(player)) {
  34.             return debugees.get(player);
  35.         } else {
  36.             return false;
  37.         }
  38.     }
  39.  
  40.     public void setDebugging(final Player player, final boolean value) {
  41.         debugees.put(player, value);
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment