Guest User

Untitled

a guest
Jul 29th, 2016
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.bukkit.GameMode;
  2. import org.bukkit.command.Command;
  3. import org.bukkit.command.CommandSender;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.plugin.java.JavaPlugin;
  6.  
  7. public class GMCPlugin extends JavaPlugin {
  8.  
  9.  
  10.  
  11.  
  12. @Override
  13. public void onEnable(){
  14. getLogger().info("hello, Your pluggin is loadded!");
  15.  
  16. }
  17. @Override
  18. public void onDisable(){
  19.  
  20. }
  21.  
  22.  
  23.  
  24. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args, GameMode CREATIVE){
  25. if(cmd.getName().equalsIgnoreCase("gmc")&& sender instanceof Player){
  26. Player player = (Player) sender;
  27. player.setGameMode(GameMode.CREATIVE);
  28. return true;
  29. }
  30.  
  31. return false;
  32.  
  33. }
RAW Paste Data