Witaj świat w Bukkit
package me.HelloWorld;
import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;
public class HelloWorld extends JavaPlugin
{
Logger log = Logger.getLogger("Minecraft");
public void onEnable()
{
log.info("Your plugin has been enabled!");
}
public void onDisable()
{
log.info("Your plugin has been disabled.");
}
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
{
if (cmd.getName().equalsIgnoreCase("hello"))
{
sender.sendMessage("Hello World!");
return true;
}
return false;
}
}
Elegant Elk