Hi! I'm aking a plugin....
package mjs.minecraft.plugin.hello;
import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class HelloPlugin extends JavaPlugin {
public static final Logger log = Logger.getLogger("Minecraft");
@Override
public void onDisable() {
PluginManager pluginManager = getServer().getPluginManager();
log.info("Hello plugin has been disabled.");
}
@Override
public void onEnable() {
log.info("Plugin has been enabled!");
}
@Override
public boolean onCommand(CommandSender sender, Command command,
String label, String[] args) {
if(label.equals("hello")) {
Player player = (Player) sender;
player.sendMessage("Hello " + player.getDisplayName());
return true;
}
return false;
}
}
import java.util.logging.Logger;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class HelloPlugin extends JavaPlugin {
public static final Logger log = Logger.getLogger("Minecraft");
@Override
public void onDisable() {
PluginManager pluginManager = getServer().getPluginManager();
log.info("Hello plugin has been disabled.");
}
@Override
public void onEnable() {
log.info("Plugin has been enabled!");
}
@Override
public boolean onCommand(CommandSender sender, Command command,
String label, String[] args) {
if(label.equals("hello")) {
Player player = (Player) sender;
player.sendMessage("Hello " + player.getDisplayName());
return true;
}
return false;
}
}
name: MHello
main: mjs.minecraft.plugin.hello.HelloPlugin
version: 0.1
author: Hangar555
website:
description: Example command to say hello to the user
commands:
hello:
description: Say hello to the user.
usage: /hi
main: mjs.minecraft.plugin.hello.HelloPlugin
version: 0.1
author: Hangar555
website:
description: Example command to say hello to the user
commands:
hello:
description: Say hello to the user.
usage: /hi