Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tgdrei;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public class tgdreiprogrammieren extends JavaPlugin {
- public void onEnable () {
- System.out.println("[tgdrei] started succesful!");
- }
- public void onDisable () {
- System.out.println("[tgdrei] stopped succesful!");
- }
- public boolean onCommand(CommandSender sender, Command cmd, String cmdLabel, String [] args) {
- Player p = (Player) sender;
- if (cmd.getName().equalsIgnoreCase("heal")) {
- if (p.hasPermission("tgdrei.heal")) {
- if(args.length == 0) {
- p.sendMessage("ยงaYou were succesfull healed!");
- p.setHealth(20.0);
- }
- }
- return true;
- }
- else {
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment