Lexepi

Untitled

Apr 6th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. package fr.lexepi.chat;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.plugin.PluginManager;
  5. import org.bukkit.plugin.java.JavaPlugin;
  6.  
  7. import fr.lexepi.chat.command.ChatCommand;
  8. import fr.lexepi.chat.listeners.CanSpeak;
  9. import fr.lexepi.chat.listeners.InventoryInteract;
  10.  
  11. public class Chat extends JavaPlugin{
  12.  
  13. private CurrentChat current;
  14.  
  15. @Override
  16. public void onEnable() {
  17. current = CurrentChat.ACTIVATE;
  18.  
  19. getCommand("chat").setExecutor(new ChatCommand(this));
  20. PluginManager pm = Bukkit.getPluginManager();
  21. pm.registerEvents(new CanSpeak(this), this);
  22. pm.registerEvents(new InventoryInteract(this), this);
  23. }
  24.  
  25.  
  26. public void setState(CurrentChat chat){
  27. current = chat;
  28. }
  29.  
  30. public boolean getState(CurrentChat chat){
  31. return current == chat;
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment