CommandExector class to handle commands

This commit is contained in:
Charlie Wang 2013-06-30 10:00:52 -04:00
parent ac22a680a1
commit a536bb4038
2 changed files with 17 additions and 5 deletions

View File

@ -2,15 +2,11 @@ package gibstick.bukkit.DiscoSheep;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
/**
*
* @author Charlie
*/
public final class DiscoSheep extends JavaPlugin { public final class DiscoSheep extends JavaPlugin {
@Override @Override
public void onEnable(){ public void onEnable(){
getCommand("ds").setExecutor(new DiscoSheepCommandExecutor());
} }
@Override @Override

View File

@ -0,0 +1,16 @@
package gibstick.bukkit.DiscoSheep;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.CommandExecutor;
import org.bukkit.entity.Sheep;
public class DiscoSheepCommandExecutor implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
return true;
}
}