Advertisement
Guest User

Untitled

a guest
Oct 30th, 2012
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. package me.FusionTech.FisionPlugin;
  2.  
  3. import java.util.List;
  4. import java.util.logging.Logger;
  5.  
  6. import org.bukkit.ChatColor;
  7. import org.bukkit.Location;
  8. import org.bukkit.command.Command;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.Player;
  11. import org.bukkit.event.Event;
  12. import org.bukkit.plugin.PluginDescriptionFile;
  13. import org.bukkit.plugin.PluginManager;
  14. import org.bukkit.plugin.java.JavaPlugin;
  15.  
  16. @SuppressWarnings("unused")
  17. public class Fision extends JavaPlugin {
  18. public final Logger logger = Logger.getLogger("Minecraft");
  19. public static Fision plugin;
  20.  
  21. @Override
  22. public void onDisable() {
  23. PluginDescriptionFile pdfFile = this.getDescription();
  24. this.logger.info(pdfFile.getName()
  25. + "[FissionPlugin] Has been Disabled");
  26.  
  27. }
  28.  
  29. @Override
  30. public void onEnable() {
  31. PluginDescriptionFile pdfFile = this.getDescription();
  32. this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion()
  33. + "[FissionPlugin] Has been Enabled");
  34. getConfig().options().copyDefaults(true);
  35. saveConfig();
  36.  
  37. }
  38.  
  39. public boolean onCommand(CommandSender sender, Command cmd,
  40. String commandLabel, String[] args) {
  41. Player player = (Player) sender;
  42. if (commandLabel.equalsIgnoreCase("staff")) {
  43. player.sendMessage(getConfig().getString("Staff"));
  44. }
  45. if (player.hasPermission("fission.heal.ulti")) {
  46. if (commandLabel.equalsIgnoreCase("Ultiheal")) {
  47. player.setHealth(20);
  48. player.setFoodLevel(20);
  49. player.setRemainingAir(20);
  50. player.setFireTicks(0);
  51. player.sendMessage(ChatColor.DARK_GREEN
  52. + "You have been healed!");
  53. }
  54. if (player.hasPermission("fission.list.speed")) {
  55. if (commandLabel.equalsIgnoreCase("speed")) {
  56. player.setWalkSpeed(9);
  57. player.sendMessage(ChatColor.DARK_GREEN
  58. + "Walk speed set to 9");
  59.  
  60. }
  61. }
  62. if (player.hasPermission("fission.away")) {
  63. if (commandLabel.equalsIgnoreCase("away")) {
  64. if (args.length == 0) {
  65. player.sendMessage("Too little arguments");
  66. if (args.length == 1) {
  67. Player targetPlayer = player.getServer().getPlayer(
  68. args[1]);
  69. Location location = Location(getConfig().getString(
  70. "AwayLocation"));
  71. }
  72. if (player.hasPermission("fission.wanted.addwanted")) {
  73. if (commandLabel.equalsIgnoreCase("addwanted")) {
  74. if (args.length == 1) {
  75. List<String> wanted = getConfig()
  76. .getStringList("WantedList");
  77. getConfig().set("Wanted List", args[0]);
  78. }
  79. }
  80. }
  81. if (player.hasPermission("fission.wanted.list")) {
  82. if (commandLabel.equalsIgnoreCase("listwanted")) {
  83. player.sendMessage(getConfig().getString(
  84. "Wanted List"));
  85. }
  86. }
  87. }
  88. }
  89.  
  90. }
  91. }
  92. return false;
  93. }
  94.  
  95. private Location Location(String string) {
  96. // TODO Auto-generated method stub
  97. return null;
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement