Advertisement
riking

Untitled

Oct 6th, 2013
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. package com.github.riking.singlefileplugins;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class OpCommandStub extends JavaPlugin implements Listener {
  10.     @Override
  11.     public void onEnable() {
  12.         getCommand("op").setExecutor(this);
  13.         getServer().getScheduler().runTask(this, new Runnable() {
  14.             public void run() {
  15.                 Bukkit.getPluginCommand("op").setExecutor(OpCommandStub.this);
  16.             }
  17.         });
  18.     }
  19.  
  20.     public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
  21.         getLogger().warning(sender.getName() + " attempted to use /op");
  22.         return true;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement