Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.zach.to;
- import java.util.logging.Logger;
- import org.bukkit.ChatColor;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.PluginDescriptionFile;
- import org.bukkit.plugin.java.JavaPlugin;
- public class commands extends JavaPlugin{
- public final Logger logger = Logger.getLogger("Minecraft");
- public static commands plugin;
- @Override
- public void onDisable() {
- PluginDescriptionFile pdfFile = this.getDescription();
- this.logger.info(pdfFile.getName() + "Disabled");
- }
- @Override
- public void onEnable() {
- PluginDescriptionFile pdfFile = this.getDescription();
- this.logger.info(pdfFile.getName() + " " + pdfFile.getVersion() + " Enabled");
- }
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] arges){
- Player player = (Player) sender;
- if(commandLabel.equalsIgnoreCase("telep")){
- if(arges.length==0){
- player.sendMessage(ChatColor.AQUA + "Teleporter V.Beta 1.0");
- player.sendMessage(ChatColor.AQUA + "Plugin made by: Zach Farley");
- }if(arges.length==1){
- player.sendMessage("It works!");
- }if(arges.length>1){
- player.sendMessage(ChatColor.DARK_RED + "Too many arges!");
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement