TogetherFreaksDREI

Untitled

Nov 24th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. package tgdrei;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandSender;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. public class tgdreiprogrammieren extends JavaPlugin {
  9. public void onEnable () {
  10. System.out.println("[tgdrei] started succesful!");
  11. }
  12. public void onDisable () {
  13. System.out.println("[tgdrei] stopped succesful!");
  14. }
  15. public boolean onCommand(CommandSender sender, Command cmd, String cmdLabel, String [] args) {
  16.  
  17. Player p = (Player) sender;
  18. if (cmd.getName().equalsIgnoreCase("heal")) {
  19. if (p.hasPermission("tgdrei.heal")) {
  20. if(args.length == 0) {
  21. p.sendMessage("ยงaYou were succesfull healed!");
  22. p.setHealth(20.0);
  23. }
  24.  
  25. }
  26. return true;
  27. }
  28. else {
  29. return false;
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment