Advertisement
Guest User

FunnyFoots.java

a guest
Aug 28th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.96 KB | None | 0 0
  1. package me.funnyman850.FunnyFoots;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.logging.Logger;
  5.  
  6. import org.bukkit.Bukkit;
  7. import org.bukkit.ChatColor;
  8. import org.bukkit.command.Command;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.Player;
  11. import org.bukkit.event.Listener;
  12. import org.bukkit.plugin.PluginManager;
  13. import org.bukkit.plugin.java.JavaPlugin;
  14.  
  15. public class FunnyFoots extends JavaPlugin
  16. {
  17.  
  18. public final Listener playerListener = new FunnyFootsListener(this);
  19. public static ArrayList<Player> FunnyFire;
  20. public static FunnyFoots instance;
  21. public ArrayList<Player> FunnyDrug;
  22. public ArrayList<Player> FunnyPotion;
  23. public ArrayList<Player> FunnyEnd;
  24. public ArrayList<Player> FunnyLove;
  25. public ArrayList<Player> FunnyFish;
  26. public ArrayList<Player> FunnyLava;
  27. public ArrayList<Player> FunnyHate;
  28. public ArrayList<Player> FunnySeason;
  29. public ArrayList<Player> FunnyExplosion;
  30. public ArrayList<Player> FunnyFireworks;
  31. public ArrayList<Player> FunnyRedstone;
  32. public ArrayList<Player> FunnySlime;
  33. public ArrayList<Player> FunnyFootstep;
  34.  
  35. public boolean EnableFire = true;
  36. public boolean EnableEnd = true;
  37. public boolean EnablePotion = true;
  38. public boolean EnableLove = true;
  39. public boolean EnableDrug = true;
  40. public boolean EnableFish = true;
  41. public boolean EnableHate = true;
  42. public boolean EnableLava = true;
  43. public boolean EnableSeason = true;
  44. public boolean EnableExplosion = true;
  45. public boolean EnableFireworks = true;
  46. public boolean EnableRedstone = true;
  47. public boolean EnableSlime = true;
  48. public boolean EnableFootstep = true;
  49.  
  50. Logger log;
  51.  
  52. public void onEnable()
  53. {
  54. this.log = getLogger();
  55. FunnyFoots.instance = this;
  56. this.saveDefaultConfig();
  57.  
  58.  
  59. FunnyFoots.FunnyFire = new ArrayList<Player>();
  60. this.FunnyDrug = new ArrayList<Player>();
  61. FunnyFoots.FunnyFire = new ArrayList<Player>();
  62. this.FunnyPotion = new ArrayList<Player>();
  63. this.FunnyEnd = new ArrayList<Player>();
  64. this.FunnyLove = new ArrayList<Player>();
  65. this.FunnyFish = new ArrayList<Player>();
  66. this.FunnyLava = new ArrayList<Player>();
  67. this.FunnyHate = new ArrayList<Player>();
  68. this.FunnySeason = new ArrayList<Player>();
  69. this.FunnyExplosion = new ArrayList<Player>();
  70. this.FunnyFireworks = new ArrayList<Player>();
  71. this.FunnyRedstone = new ArrayList<Player>();
  72. this.FunnySlime = new ArrayList<Player>();
  73. this.FunnyFootstep = new ArrayList<Player>();
  74. this.EnableFire = this.getConfig().getBoolean("EnableFire");
  75. this.EnableEnd = this.getConfig().getBoolean("EnableEnd");
  76. this.EnablePotion = this.getConfig().getBoolean("EnablePotion");
  77. this.EnableLove = this.getConfig().getBoolean("EnableLove");
  78. this.EnableDrug = this.getConfig().getBoolean("EnableDrug");
  79. this.EnableFish = this.getConfig().getBoolean("EnableFish");
  80. this.EnableHate = this.getConfig().getBoolean("EnableHate");
  81. this.EnableLava = this.getConfig().getBoolean("EnableLava");
  82. this.EnableSeason = this.getConfig().getBoolean("EnableSeason");
  83. this.EnableExplosion = this.getConfig().getBoolean("EnableExplosion");
  84. this.EnableFireworks = this.getConfig().getBoolean("EnableFireworks");
  85. this.EnableRedstone = this.getConfig().getBoolean("EnableRedstone");
  86. this.EnableSlime = this.getConfig().getBoolean("EnableSlime");
  87. this.EnableFootstep = this.getConfig().getBoolean("EnableFootstep");
  88.  
  89. this.log.info("FunnyFoots has Been Enabled!");
  90. PluginManager pm = getServer().getPluginManager();
  91. pm.registerEvents(this.playerListener, this);
  92. }
  93.  
  94. public void onDisable() {
  95. this.log.info("FunnyFoots has been disabled!");
  96. }
  97.  
  98. public boolean onCommand(CommandSender sender, Command cmd, String commandlabel, String[] args) {
  99. ChatColor red = ChatColor.RED;
  100. ChatColor aqua = ChatColor.AQUA;
  101. ChatColor yellow = ChatColor.YELLOW;
  102. ChatColor green = ChatColor.GREEN;
  103. if (args.length < 1) {
  104. if ((sender instanceof Player)) {
  105. Player player = (Player)sender;
  106. if (cmd.getName().equalsIgnoreCase("Funnyfire")) {
  107. if (player.hasPermission("FunnyFoot.FunnyFire")) {
  108. if (FunnyFoots.FunnyFire.contains(player)) {
  109. FunnyFoots.FunnyFire.remove(player);
  110. player.sendMessage(yellow + getConfig().getString("DisableFunnyFire"));
  111. return true;
  112. }
  113. FunnyFoots.FunnyFire.add(player);
  114. player.sendMessage(yellow + getConfig().getString("EnableFunnyFire"));
  115. return true;
  116. }
  117.  
  118. player.sendMessage(red + "No permission.");
  119. }
  120. else if (cmd.getName().equalsIgnoreCase("FunnyDrug")) {
  121. if (player.hasPermission("FunnyFoot.FunnyDrug")) {
  122. if (this.FunnyDrug.contains(player)) {
  123. this.FunnyDrug.remove(player);
  124. player.sendMessage(yellow + getConfig().getString("DisableFunnyDrug"));
  125. return true;
  126. }
  127. this.FunnyDrug.add(player);
  128. player.sendMessage(yellow + getConfig().getString("EnableFunnyDrug"));
  129. return true;
  130. }
  131.  
  132. player.sendMessage(red + "No permission");
  133. }
  134. else if (cmd.getName().equalsIgnoreCase("FunnyFish")) {
  135. if (player.hasPermission("FunnyFoot.FunnyFish")) {
  136. if (this.FunnyFish.contains(player)) {
  137. this.FunnyFish.remove(player);
  138. player.sendMessage(yellow + getConfig().getString("DisableFunnyFish"));
  139. return true;
  140. }
  141. this.FunnyFish.add(player);
  142. player.sendMessage(yellow + getConfig().getString("EnableFunnyFish"));
  143. return true;
  144. }
  145.  
  146. player.sendMessage(red + "No permission");
  147. }
  148. else if (cmd.getName().equalsIgnoreCase("FunnyLava")) {
  149. if (player.hasPermission("FunnyFoot.FunnyLava")) {
  150. if (this.FunnyLava.contains(player)) {
  151. this.FunnyLava.remove(player);
  152. player.sendMessage(yellow + getConfig().getString("DisableFunnyLava"));
  153. return true;
  154. }
  155. this.FunnyLava.add(player);
  156. player.sendMessage(yellow + getConfig().getString("EnableFunnyLava"));
  157. return true;
  158. }
  159.  
  160. player.sendMessage(red + "No permission");
  161. }
  162. else if (cmd.getName().equalsIgnoreCase("FunnyLove")) {
  163. if (player.hasPermission("FunnyFoot.FunnyLove")) {
  164. if (this.FunnyLove.contains(player)) {
  165. this.FunnyLove.remove(player);
  166. player.sendMessage(yellow + getConfig().getString("DisableFunnyLove"));
  167. return true;
  168. }
  169. this.FunnyLove.add(player);
  170. player.sendMessage(yellow + getConfig().getString("EnableFunnyLove"));
  171. return true;
  172. }
  173.  
  174. player.sendMessage(red + "No permission");
  175. }
  176. else if (cmd.getName().equalsIgnoreCase("FunnyHate")) {
  177. if (player.hasPermission("FunnyFoot.FunnyHate")) {
  178. if (this.FunnyHate.contains(player)) {
  179. this.FunnyHate.remove(player);
  180. player.sendMessage(yellow + getConfig().getString("DisableFunnyHate"));
  181. return true;
  182. }
  183. this.FunnyHate.add(player);
  184. player.sendMessage(yellow + getConfig().getString("EnableFunnyHate"));
  185. return true;
  186. }
  187.  
  188. player.sendMessage(red + "No permission");
  189. }
  190. else if (cmd.getName().equalsIgnoreCase("FunnySeason")) {
  191. if (player.hasPermission("FunnyFoot.FunnySeason")) {
  192. if (this.FunnySeason.contains(player)) {
  193. this.FunnySeason.remove(player);
  194. player.sendMessage(yellow + getConfig().getString("DisableFunnySeason"));
  195. return true;
  196. }
  197. this.FunnySeason.add(player);
  198. player.sendMessage(yellow + getConfig().getString("EnableFunnySeason"));
  199. return true;
  200. }
  201.  
  202. player.sendMessage(red + "No permission");
  203. }
  204. else if (cmd.getName().equalsIgnoreCase("FunnyPotion")) {
  205. if (player.hasPermission("FunnyFoot.FunnyPotion")) {
  206. if (this.FunnyPotion.contains(player)) {
  207. this.FunnyPotion.remove(player);
  208. player.sendMessage(yellow + getConfig().getString("DisableFunnyPotion"));
  209. return true;
  210. }
  211. this.FunnyPotion.add(player);
  212. player.sendMessage(yellow + getConfig().getString("EnableFunnyPotion"));
  213. return true;
  214. }
  215.  
  216. player.sendMessage(red + "No permission");
  217. }
  218. else if (cmd.getName().equalsIgnoreCase("FunnyEnd")) {
  219. if (player.hasPermission("FunnyFoot.FunnyEnd")) {
  220. if (this.FunnyEnd.contains(player)) {
  221. this.FunnyEnd.remove(player);
  222. player.sendMessage(yellow + getConfig().getString("DisableFunnyEnd"));
  223. return true;
  224. }
  225. this.FunnyEnd.add(player);
  226. player.sendMessage(yellow + getConfig().getString("EnableFunnyEnd"));
  227. return true;
  228. }
  229.  
  230. player.sendMessage(red + "No permission");
  231. }
  232. else if (cmd.getName().equalsIgnoreCase("FunnyExplosion")) {
  233. if (player.hasPermission("FunnyFoot.FunnyExplosion")) {
  234. if (this.FunnyExplosion.contains(player)) {
  235. this.FunnyExplosion.remove(player);
  236. player.sendMessage(yellow + getConfig().getString("DisableFunnyExplosion"));
  237. return true;
  238. }
  239. this.FunnyExplosion.add(player);
  240. player.sendMessage(yellow + getConfig().getString("EnableFunnyExplosion"));
  241. return true;
  242. }
  243.  
  244. player.sendMessage(red + "No permission");
  245. }
  246. else if (cmd.getName().equalsIgnoreCase("FunnyFireworks")) {
  247. if (player.hasPermission("FunnyFoot.FunnyFireworks")) {
  248. if (this.FunnyFireworks.contains(player)) {
  249. this.FunnyFireworks.remove(player);
  250. player.sendMessage(yellow + getConfig().getString("DisableFunnyFireworks"));
  251. return true;
  252. }
  253. this.FunnyFireworks.add(player);
  254. player.sendMessage(yellow + getConfig().getString("EnableFunnyFireworks"));
  255. return true;
  256. }
  257.  
  258. player.sendMessage(red + "No permission");
  259. }
  260. else if (cmd.getName().equalsIgnoreCase("FunnyRedstone")) {
  261. if (player.hasPermission("FunnyFoot.FunnyRedstone")) {
  262. if (this.FunnyRedstone.contains(player)) {
  263. this.FunnyRedstone.remove(player);
  264. player.sendMessage(yellow + getConfig().getString("DisableFunnyRedstone"));
  265. return true;
  266. }
  267. this.FunnyRedstone.add(player);
  268. player.sendMessage(yellow + getConfig().getString("EnableFunnyRedstone"));
  269. return true;
  270. }
  271.  
  272. player.sendMessage(red + "No permission");
  273. }
  274. else if (cmd.getName().equalsIgnoreCase("FunnySlime")) {
  275. if (player.hasPermission("FunnyFoot.FunnySlime")) {
  276. if (this.FunnySlime.contains(player)) {
  277. this.FunnySlime.remove(player);
  278. player.sendMessage(yellow + getConfig().getString("DisableFunnySlime"));
  279. return true;
  280. }
  281. this.FunnySlime.add(player);
  282. player.sendMessage(yellow + getConfig().getString("EnableFunnySlime"));
  283. return true;
  284. }
  285.  
  286. player.sendMessage(red + "No permission");
  287. }
  288. else if (cmd.getName().equalsIgnoreCase("FunnyFootstep")) {
  289. if (player.hasPermission("FunnyFoot.FunnyFootstep")) {
  290. if (this.FunnyFootstep.contains(player)) {
  291. this.FunnyFootstep.remove(player);
  292. player.sendMessage(yellow + getConfig().getString("DisableFunnyFootstep"));
  293. return true;
  294. }
  295. this.FunnyFootstep.add(player);
  296. player.sendMessage(yellow + getConfig().getString("EnableFunnyFootstep"));
  297. return true;
  298. }
  299.  
  300. player.sendMessage(red + "No permission");
  301. }
  302. else if (cmd.getName().equalsIgnoreCase("FunnyCheck")) {
  303. if ((player.hasPermission("FunnyFoot.FunnyFire")) || (player.hasPermission("FunnyFoot.FunnyEnd")) || (player.hasPermission("FunnyFoot.FunnyPotion")) || (player.hasPermission("FunnyFoot.FunnyLove")) || (player.hasPermission("FunnyFoot.FunnyFish")) || (player.hasPermission("FunnyFoot.FunnyLava")) || (player.hasPermission("FunnyFoot.FunnyHate")) || (player.hasPermission("FunnyFoot.FunnySeason")) || (player.hasPermission("FunnyFoot.FunnyEnd")) || (player.hasPermission("FunnyFoot.FunnyExplosion")) || (player.hasPermission("FunnyFoot.FunnyFirework")) ||(player.hasPermission("FunnyFoot.FunnyRedstone")) ||(player.hasPermission("FunnyFoot.FunnySlime")) || (player.hasPermission("FunnyFoot.FunnyFootstep"))) {
  304. player.sendMessage(yellow + "Available Feet FX:");
  305. if (FunnyFoots.FunnyFire.contains(player)) {
  306. player.sendMessage("- FunnyFire");
  307. }
  308.  
  309. if (this.FunnyDrug.contains(player)) {
  310. player.sendMessage("- FunnyDrug");
  311. }
  312.  
  313. if (this.FunnyPotion.contains(player)) {
  314. player.sendMessage("- FunnyPotion");
  315. }
  316.  
  317. if (this.FunnyEnd.contains(player)) {
  318. player.sendMessage("- FunnyEnd");
  319. }
  320.  
  321. if (this.FunnyLove.contains(player)) {
  322. player.sendMessage("- FunnyLove");
  323. }
  324.  
  325. if (this.FunnyFish.contains(player)) {
  326. player.sendMessage("- FunnyFish");
  327. }
  328.  
  329. if (this.FunnyLava.contains(player)) {
  330. player.sendMessage("- FunnyLava");
  331. }
  332.  
  333. if (this.FunnyHate.contains(player)) {
  334. player.sendMessage("- FunnyHate");
  335. }
  336.  
  337. if (this.FunnySeason.contains(player)) {
  338. player.sendMessage("- FunnySeason");
  339. }
  340.  
  341. if (this.FunnyExplosion.contains(player)) {
  342. player.sendMessage("- FunnyExplosion");
  343. }
  344.  
  345. if (this.FunnyFireworks.contains(player)) {
  346. player.sendMessage("- FunnyFireworks");
  347. }
  348.  
  349. if (this.FunnyRedstone.contains(player)) {
  350. player.sendMessage("- FunnyRedstone");
  351. }
  352.  
  353. if (this.FunnySlime.contains(player)) {
  354. player.sendMessage("- FunnySlime");
  355. }
  356.  
  357. if (this.FunnyFootstep.contains(player)) {
  358. player.sendMessage("- FunnyFootstep");
  359. }
  360.  
  361. if ((!FunnyFoots.FunnyFire.contains(player)) && (!this.FunnyDrug.contains(player)) && (!this.FunnyPotion.contains(player)) && (!this.FunnyEnd.contains(player)) && (!this.FunnyFish.contains(player)) && (!this.FunnyLava.contains(player)) && (!this.FunnyHate.contains(player)) && (!this.FunnySeason.contains(player)) && (!this.FunnyLove.contains(player)) && (!this.FunnyExplosion.contains(player)) && (!this.FunnyFireworks.contains(player)) && (!this.FunnyRedstone.contains(player)) && (!this.FunnySlime.contains(player)) && (!this.FunnyFootstep.contains(player))) {
  362. player.sendMessage("WEll You Either Dont Have Acess Or Dont Have Any Foots Turned on");
  363. }
  364. }
  365. else
  366. {
  367. player.sendMessage(red + "No Perms...#FAIL");
  368. }
  369. } else { if (cmd.getName().equalsIgnoreCase("funnyfoot")) {
  370. player.sendMessage( ChatColor.AQUA + "Funny" + ChatColor.YELLOW + "Foot" + yellow + " - By" + red + " funnyman850");
  371. player.sendMessage(aqua + "To Toggle Foots Off after turning them on is the same command for simplicity!");
  372. player.sendMessage(aqua + "Availiable commands:");
  373. player.sendMessage(green + "CrazyFeet modes:");
  374. player.sendMessage(red + "-" + green + " /funnyfire" + yellow + " - While Walking Have Fire Particles!");
  375. player.sendMessage(red + "-" + green + " /crazydrug" + yellow + " - while walking smoke =)!");
  376. player.sendMessage(red + "-" + green + " /funnypotion" + yellow + " - Walk on PotionMagicalNess!");
  377. player.sendMessage(red + "-" + green + " /funnyend" + yellow + " - While Walking Have EnderPearl Effects!");
  378. player.sendMessage(red + "-" + green + " /funnylava" + yellow + " - While Walking Have Lava Particle Effects Effects!");
  379. player.sendMessage(red + "-" + green + " /funnylove" + yellow + " -While Walking Have Heart Particle Effects!");
  380. player.sendMessage(red + "-" + green + " /funnyfish" + yellow + " - While Walking have bubble effects!");
  381. player.sendMessage(red + "-" + green + " /funnyhate" + yellow + " -While walking have storm cloud particle effects!");
  382. player.sendMessage(red + "-" + green + " /funnyseason" + yellow + "While Walking have Seasonally changing foot effects!");
  383. player.sendMessage(red + "-" + green + " /funnyexplosion" + yellow + "While walking have explosion effects!");
  384. player.sendMessage(red + "-" + green + " /funnyfireworks" + yellow + "While walking have firework spark effects!");
  385. player.sendMessage(red + "-" + green + " /funnyredstone" + yellow + "While walking have redstone dust effects!");
  386. player.sendMessage(red + "-" + green + " /funnyslime" + yellow + "While walking have slime particle effects!");
  387. player.sendMessage(red + "-" + green + " /funnyfootstep" + yellow + "While walking have footsteps follow you!");
  388. player.sendMessage(red + "funnyfoot help:");
  389. player.sendMessage(red + "-" + aqua + " /funnyfoot" + red + " - Display this menu.");
  390. player.sendMessage(red + "-" + green + " /funnycheck" + yellow + " - Find which Funny modes are active!");
  391. player.sendMessage(red + "-" + aqua + " /funnydisable" + red + " - Disable all of your FunnyFoots modes!");
  392. player.sendMessage(red + "-" + green + " /funnyfoot admin" + yellow + " - Displays FunnyFoot admin commands!");
  393. player.sendMessage(red + "All commands turned on and off.");
  394. return true;
  395. }if (cmd.getName().equalsIgnoreCase("funnydisable")) {
  396. if ((player.hasPermission("FunnyFoot.FunnyFire")) || (player.hasPermission("FunnyFoot.FunnyDrug")) || (player.hasPermission("FunnyFoot.FunnyPotion")) || (player.hasPermission("FunnyFoot.FunnyEnd")) || (player.hasPermission("FunnyFoot.FunnyFish")) || (player.hasPermission("FunnyFoot.FunnyLava")) || (player.hasPermission("FunnyFoot.FunnyHate")) || (player.hasPermission("FunnyFoot.FunnySeason")) || (player.hasPermission("FunnyFoot.FunnyLove")) || (player.hasPermission("FunnyFoot.Explosion")) || (player.hasPermission("FunnyFoot.Fireworks")) || (player.hasPermission("FunnyFoot.Redstone")) || (player.hasPermission("FunnyFoot.FunnySlime")) || (player.hasPermission("FunnyFoot.FunnyFootstep"))) {
  397. if (FunnyFoots.FunnyFire.contains(player)) {
  398. FunnyFoots.FunnyFire.remove(player);
  399. }
  400.  
  401. if (this.FunnyDrug.contains(player)) {
  402. this.FunnyDrug.remove(player);
  403. }
  404.  
  405. if (this.FunnyPotion.contains(player)) {
  406. this.FunnyPotion.remove(player);
  407. }
  408.  
  409. if (this.FunnyEnd.contains(player)) {
  410. this.FunnyEnd.remove(player);
  411. }
  412.  
  413. if (this.FunnyFish.contains(player)) {
  414. this.FunnyFish.remove(player);
  415. }
  416.  
  417. if (this.FunnyLava.contains(player)) {
  418. this.FunnyLava.remove(player);
  419. }
  420.  
  421. if (this.FunnyHate.contains(player)) {
  422. this.FunnyHate.remove(player);
  423. }
  424.  
  425. if (this.FunnySeason.contains(player)) {
  426. this.FunnySeason.remove(player);
  427. }
  428.  
  429. if (this.FunnyLove.contains(player)) {
  430. this.FunnyLove.remove(player);
  431. }
  432.  
  433. if (this.FunnyExplosion.contains(player)) {
  434. this.FunnyExplosion.remove(player);
  435. }
  436.  
  437. if (this.FunnyFireworks.contains(player)) {
  438. this.FunnyFireworks.remove(player);
  439. }
  440.  
  441. if (this.FunnyRedstone.contains(player)) {
  442. this.FunnyRedstone.remove(player);
  443. }
  444.  
  445. if (this.FunnySlime.contains(player)) {
  446. this.FunnySlime.remove(player);
  447. }
  448.  
  449. if (this.FunnyFootstep.contains(player)) {
  450. this.FunnyFootstep.remove(player);
  451. }
  452.  
  453. player.sendMessage(green + "All of your FunnyFoot modes have Turned Off!");
  454. } else {
  455. player.sendMessage(yellow + "HAHA...No Perms...");
  456. }
  457. return true;
  458. }
  459. return true; }
  460. }
  461. else {
  462. sender.sendMessage(red + "You must be ingame to toggle effects for yourself. Use /command <target> to toggle for others.");
  463. }
  464. } else if (args.length == 1) {
  465. if (cmd.getName().equalsIgnoreCase("funnyfire")) {
  466. if (sender.hasPermission("FunnyFoot.fireother")) {
  467. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  468. Player targ = Bukkit.getServer().getPlayer(args[0]);
  469. if (FunnyFoots.FunnyFire.contains(targ)) {
  470. FunnyFoots.FunnyFire.remove(targ);
  471. targ.sendMessage(red + sender.getName() + " has disabled your FunnyFire!");
  472. sender.sendMessage(red + targ.getDisplayName() + "'s FunnyFire has been disabled!");
  473. } else {
  474. FunnyFoots.FunnyFire.add(targ);
  475. targ.sendMessage(yellow + sender.getName() + " has given you FunnyFire!");
  476. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyFire!");
  477. }
  478. } else {
  479. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  480. }
  481. }
  482. else sender.sendMessage(red + "You do not have permission to Foot Others!");
  483. }
  484. else if (cmd.getName().equalsIgnoreCase("funnydrug")) {
  485. if (sender.hasPermission("FunnyFoot.drugother")) {
  486. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  487. Player targ = Bukkit.getServer().getPlayer(args[0]);
  488. if (this.FunnyDrug.contains(targ)) {
  489. this.FunnyDrug.remove(targ);
  490. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnyDrug!");
  491. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyDrug has been disabled!");
  492. } else {
  493. this.FunnyDrug.add(targ);
  494. targ.sendMessage(yellow + sender.getName() + " has given you FunnyDrug!");
  495. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyDrugs!");
  496. }
  497. } else {
  498. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  499. }
  500. }
  501. else sender.sendMessage(red + "You do not have permission to drug other esspecially with funny....");
  502. }
  503. else if (cmd.getName().equalsIgnoreCase("funnyend")) {
  504. if (sender.hasPermission("FunnyFoot.endother")) {
  505. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  506. Player targ = Bukkit.getServer().getPlayer(args[0]);
  507. if (this.FunnyEnd.contains(targ)) {
  508. this.FunnyEnd.remove(targ);
  509. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnyEnd!");
  510. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyEnd has been disabled!");
  511. } else {
  512. this.FunnyEnd.add(targ);
  513. targ.sendMessage(yellow + sender.getName() + " has given you FunnyEnd!");
  514. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyEnd!");
  515. }
  516. } else {
  517. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  518. }
  519. }
  520. else sender.sendMessage(red + "You do not have permission to End Others...well with FunnyFoots....");
  521. }
  522. else if (args.length == 1) {
  523. if (cmd.getName().equalsIgnoreCase("FunnyLove")) {
  524. if (sender.hasPermission("FunnyFoot.loveother")) {
  525. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  526. Player targ = Bukkit.getServer().getPlayer(args[0]);
  527. if (this.FunnyLove.contains(targ)) {
  528. this.FunnyLove.remove(targ);
  529. targ.sendMessage(red + sender.getName() + " has disabled your FunnyLove!");
  530. sender.sendMessage(red + targ.getDisplayName() + "'s FunnyLove has been disabled!");
  531. } else {
  532. FunnyFoots.FunnyFire.add(targ);
  533. targ.sendMessage(yellow + sender.getName() + " has given you FunnyLove!");
  534. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyLove!");
  535. }
  536. } else {
  537. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  538. }
  539. }
  540. else sender.sendMessage(red + "You do not have permission to Foot Others!");
  541. }
  542. else if (cmd.getName().equalsIgnoreCase("FunnyPotion")) {
  543. if (sender.hasPermission("FunnyFoot.potionother")) {
  544. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  545. Player targ = Bukkit.getServer().getPlayer(args[0]);
  546. if (this.FunnyPotion.contains(targ)) {
  547. this.FunnyPotion.remove(targ);
  548. targ.sendMessage(yellow + sender.getName() + " has disabled your Rad FunnyPotions!");
  549. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyPotion has been disabled!");
  550. } else {
  551. this.FunnyPotion.add(targ);
  552. targ.sendMessage(yellow + sender.getName() + " has given you FunnyPotion!");
  553. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyPotion!");
  554. }
  555. } else {
  556. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  557. }
  558. }
  559. else sender.sendMessage(red + "You do not have permission to FunnyPotion Odda Peoples....");
  560. }
  561. else if (cmd.getName().equalsIgnoreCase("FunnyFish")) {
  562. if (sender.hasPermission("FunnyFoot.fishother")) {
  563. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  564. Player targ = Bukkit.getServer().getPlayer(args[0]);
  565. if (this.FunnyFish.contains(targ)) {
  566. this.FunnyFish.remove(targ);
  567. targ.sendMessage(yellow + sender.getName() + " has disabled your Rad FunnyFish!");
  568. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyFish has been disabled!");
  569. } else {
  570. this.FunnyFish.add(targ);
  571. targ.sendMessage(yellow + sender.getName() + " has given you FunnyFish!");
  572. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyFish");
  573. }
  574. } else {
  575. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  576. }
  577. }
  578. else sender.sendMessage(red + "You do not have permission to fish Odda Peoples....");
  579. }
  580. else if (cmd.getName().equalsIgnoreCase("FunnyHate")) {
  581. if (sender.hasPermission("FunnyFoot.hateother")) {
  582. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  583. Player targ = Bukkit.getServer().getPlayer(args[0]);
  584. if (this.FunnyHate.contains(targ)) {
  585. this.FunnyHate.remove(targ);
  586. targ.sendMessage(yellow + sender.getName() + " has disabled your Rad FunnyHate!");
  587. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyHate has been disabled!");
  588. } else {
  589. this.FunnyHate.add(targ);
  590. targ.sendMessage(yellow + sender.getName() + " has given you FunnyHate!");
  591. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyHate!");
  592. }
  593. } else {
  594. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  595. }
  596. }
  597. else sender.sendMessage(red + "You do not have permission to Hate Odda Peoples....");
  598. }
  599. else if (cmd.getName().equalsIgnoreCase("FunnySeason")) {
  600. if (sender.hasPermission("FunnyFoot.seasonother")) {
  601. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  602. Player targ = Bukkit.getServer().getPlayer(args[0]);
  603. if (this.FunnySeason.contains(targ)) {
  604. this.FunnySeason.remove(targ);
  605. targ.sendMessage(yellow + sender.getName() + " has disabled your Rad Funny Seasons!");
  606. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnySeasons has been disabled!");
  607. } else {
  608. this.FunnySeason.add(targ);
  609. targ.sendMessage(yellow + sender.getName() + " has given you FunnySeason!");
  610. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnySeason!");
  611. }
  612. } else {
  613. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  614. }
  615. }
  616. else sender.sendMessage(red + "You do not have permission to Season Odda Peoples....");
  617. }
  618. else if (cmd.getName().equalsIgnoreCase("FunnyLava")) {
  619. if (sender.hasPermission("FunnyFoot.lavaother")) {
  620. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  621. Player targ = Bukkit.getServer().getPlayer(args[0]);
  622. if (this.FunnyLava.contains(targ)) {
  623. this.FunnyLava.remove(targ);
  624. targ.sendMessage(yellow + sender.getName() + " has disabled your Rad Funny Lights!");
  625. sender.sendMessage(yellow + targ.getDisplayName() + "'s Funnylight has been disabled!");
  626. } else {
  627. this.FunnyLove.add(targ);
  628. targ.sendMessage(yellow + sender.getName() + " has given you FunnyLight!");
  629. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyLight!");
  630. }
  631. } else {
  632. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  633. }
  634. }
  635. else sender.sendMessage(red + "You do not have permission to Lava Odda Peoples....");
  636. }
  637. else if (cmd.getName().equalsIgnoreCase("FunnyExplosion")) {
  638. if (sender.hasPermission("FunnyFoot.explosionother")) {
  639. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  640. Player targ = Bukkit.getServer().getPlayer(args[0]);
  641. if (this.FunnyEnd.contains(targ)) {
  642. this.FunnyEnd.remove(targ);
  643. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnyExplosion!");
  644. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyExplosion has been disabled!");
  645. } else {
  646. this.FunnyEnd.add(targ);
  647. targ.sendMessage(yellow + sender.getName() + " has given you FunnyExplosion!");
  648. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyExplosion!");
  649. }
  650. } else {
  651. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  652. }
  653. }
  654. else sender.sendMessage(red + "You do not have permission to Explosion Others...well with FunnyFoots....");
  655. }
  656. else if (cmd.getName().equalsIgnoreCase("FunnyFireworks")) {
  657. if (sender.hasPermission("FunnyFoot.fireworksother")) {
  658. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  659. Player targ = Bukkit.getServer().getPlayer(args[0]);
  660. if (this.FunnyExplosion.contains(targ)) {
  661. this.FunnyExplosion.remove(targ);
  662. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnyFireworks!");
  663. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyFireworks has been disabled!");
  664. } else {
  665. this.FunnyFireworks.add(targ);
  666. targ.sendMessage(yellow + sender.getName() + " has given you FunnyFireworks!");
  667. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyFireworks!");
  668. }
  669. } else {
  670. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  671. }
  672. }
  673. else sender.sendMessage(red + "You do not have permission to Fireworks Others...well with FunnyFoots....");
  674. }
  675. else if (cmd.getName().equalsIgnoreCase("FunnyRedstone")) {
  676. if (sender.hasPermission("FunnyFoot.redstoneother")) {
  677. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  678. Player targ = Bukkit.getServer().getPlayer(args[0]);
  679. if (this.FunnyRedstone.contains(targ)) {
  680. this.FunnyRedstone.remove(targ);
  681. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnyRedstone!");
  682. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyRedstone has been disabled!");
  683. } else {
  684. this.FunnyRedstone.add(targ);
  685. targ.sendMessage(yellow + sender.getName() + " has given you FunnyRedstone!");
  686. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyRedstone!");
  687. }
  688. } else {
  689. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  690. }
  691. }
  692. else sender.sendMessage(red + "You do not have permission to Redstone Others...well with FunnyFoots....");
  693. }
  694. else if (cmd.getName().equalsIgnoreCase("FunnySlime")) {
  695. if (sender.hasPermission("FunnyFoot.slimeother")) {
  696. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  697. Player targ = Bukkit.getServer().getPlayer(args[0]);
  698. if (this.FunnySlime.contains(targ)) {
  699. this.FunnySlime.remove(targ);
  700. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnySlime!");
  701. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnySlime has been disabled!");
  702. } else {
  703. this.FunnySlime.add(targ);
  704. targ.sendMessage(yellow + sender.getName() + " has given you FunnySlime!");
  705. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnySlime!");
  706. }
  707. } else {
  708. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  709. }
  710. }
  711. else sender.sendMessage(red + "You do not have permission to Slime Others...well with FunnyFoots....");
  712. }
  713. else if (cmd.getName().equalsIgnoreCase("FunnyFootstep")) {
  714. if (sender.hasPermission("FunnyFoot.footstepother")) {
  715. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  716. Player targ = Bukkit.getServer().getPlayer(args[0]);
  717. if (this.FunnyFootstep.contains(targ)) {
  718. this.FunnyFootstep.remove(targ);
  719. targ.sendMessage(yellow + sender.getName() + " has disabled your FunnyFootstep!");
  720. sender.sendMessage(yellow + targ.getDisplayName() + "'s FunnyEnd has been disabled!");
  721. } else {
  722. this.FunnyFootstep.add(targ);
  723. targ.sendMessage(yellow + sender.getName() + " has given you FunnyFootstep!");
  724. sender.sendMessage(yellow + targ.getDisplayName() + " has been given FunnyFootstep!");
  725. }
  726. } else {
  727. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  728. }
  729. }
  730. else sender.sendMessage(red + "You do not have permission to Footstep Others...well with FunnyFoots....");
  731. }
  732. else if (cmd.getName().equalsIgnoreCase("funnycheck")) {
  733. if (sender.hasPermission("FunnyFoot.checkother")) {
  734. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  735. Player targ = Bukkit.getServer().getPlayer(args[0]);
  736. sender.sendMessage(yellow + targ.getDisplayName() + "'s active FunnyFoots modes:");
  737. if (FunnyFoots.FunnyFire.contains(targ)) {
  738. sender.sendMessage("- FunnyFire");
  739. }
  740.  
  741. if (this.FunnyDrug.contains(targ)) {
  742. sender.sendMessage("- FunnyDrug");
  743. }
  744.  
  745. if (this.FunnyPotion.contains(targ)) {
  746. sender.sendMessage("- FunnyPotion");
  747. }
  748.  
  749. if (this.FunnyEnd.contains(targ)) {
  750. sender.sendMessage("- FunnyEnd");
  751. }
  752.  
  753. if (this.FunnyHate.contains(targ)) {
  754. sender.sendMessage("- FunnyHate");
  755. }
  756.  
  757. if (this.FunnyFish.contains(targ)) {
  758. sender.sendMessage("- FunnyFish");
  759. }
  760.  
  761. if (this.FunnyLava.contains(targ)) {
  762. sender.sendMessage("- FunnyLava");
  763. }
  764.  
  765. if (this.FunnySeason.contains(targ)) {
  766. sender.sendMessage("- FunnySeason");
  767. }
  768.  
  769. if (this.FunnyLove.contains(targ)) {
  770. sender.sendMessage("- FunnyLove");
  771. }
  772.  
  773. if (this.FunnyExplosion.contains(targ)) {
  774. sender.sendMessage("- FunnyExplosion");
  775. }
  776.  
  777. if (this.FunnyFireworks.contains(targ)) {
  778. sender.sendMessage("- FunnyFireworks");
  779. }
  780.  
  781. if (this.FunnyRedstone.contains(targ)) {
  782. sender.sendMessage("- FunnyRedstone");
  783. }
  784.  
  785. if (this.FunnySlime.contains(targ)) {
  786. sender.sendMessage("- FunnySlime");
  787. }
  788.  
  789. if (this.FunnyFootstep.contains(targ)) {
  790. sender.sendMessage("- FunnyFootstep");
  791. }
  792.  
  793. if ((!FunnyFoots.FunnyFire.contains(targ)) && (!this.FunnyDrug.contains(targ)) && (!this.FunnyPotion.contains(targ)) && (!this.FunnyFish.contains(targ)) && (!this.FunnyLava.contains(targ)) && (!this.FunnyHate.contains(targ)) && (!this.FunnySeason.contains(targ)) && (!this.FunnyEnd.contains(targ)) && (this.FunnyLove.contains(targ)) && (this.FunnyExplosion.contains(targ)) &&(this.FunnyFireworks.contains(targ)) &&(this.FunnyRedstone.contains(targ)) &&(this.FunnySlime.contains(targ)) &&(this.FunnyFootstep.contains(targ))) {
  794. sender.sendMessage(targ.getDisplayName() + " does not have any CrazyFeet modes currently activated.");
  795. }
  796. }
  797. else
  798. {
  799. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  800. }
  801. }
  802. else sender.sendMessage(red + "You do not have permission to check other people's FunnyFoot modes!");
  803. }
  804. else { if (cmd.getName().equalsIgnoreCase("funnydisable")) {
  805. if (sender.hasPermission("FunnyFoot.disableothers")) {
  806. if (Bukkit.getServer().getPlayer(args[0]) != null) {
  807. Player targ = Bukkit.getServer().getPlayer(args[0]);
  808. if (FunnyFoots.FunnyFire.contains(targ)) {
  809. FunnyFoots.FunnyFire.remove(targ);
  810. }
  811.  
  812. if (this.FunnyDrug.contains(targ)) {
  813. this.FunnyDrug.remove(targ);
  814. }
  815.  
  816. if (this.FunnyPotion.contains(targ)) {
  817. this.FunnyPotion.remove(targ);
  818. }
  819.  
  820. if (this.FunnyEnd.contains(targ)) {
  821. this.FunnyEnd.remove(targ);
  822. }
  823.  
  824. if (this.FunnyFish.contains(targ)) {
  825. this.FunnyFish.remove(targ) ;
  826. }
  827.  
  828. if (this.FunnyLava.contains(targ)) {
  829. this.FunnyLava.remove(targ) ;
  830. }
  831.  
  832. if (this.FunnyHate.contains(targ)) {
  833. this.FunnyHate.remove(targ) ;
  834. }
  835.  
  836. if (this.FunnySeason.contains(targ)) {
  837. this.FunnySeason.remove(targ) ;
  838. }
  839.  
  840. if (this.FunnyLove.contains(targ)) {
  841. this.FunnyLove.remove(targ) ;
  842. }
  843.  
  844. if (this.FunnyExplosion.contains(targ)) {
  845. this.FunnyExplosion.remove(targ) ;
  846. }
  847.  
  848. if (this.FunnyFireworks.contains(targ)) {
  849. this.FunnyFireworks.remove(targ) ;
  850. }
  851.  
  852. if (this.FunnyRedstone.contains(targ)) {
  853. this.FunnyRedstone.remove(targ) ;
  854. }
  855.  
  856. if (this.FunnySlime.contains(targ)) {
  857. this.FunnySlime.remove(targ) ;
  858. }
  859.  
  860. if (this.FunnyFootstep.contains(targ)) {
  861. this.FunnyFootstep.remove(targ) ;
  862. }
  863.  
  864. targ.sendMessage(yellow + "All of your FunnyFoots modes have been stolen by " + sender.getName() + "!");
  865. sender.sendMessage(yellow + "All of " + targ.getDisplayName() + "'s FunnyFoots modes have been Terminated =)!");
  866. } else {
  867. sender.sendMessage(red + "The player " + yellow + args[0] + red + " is either offline or does not exist!");
  868. }
  869. }
  870. else sender.sendMessage(red + "You do not have permission to disable other people's FunnyFoots!"); {
  871.  
  872. }
  873.  
  874. return false;
  875. }
  876. }
  877. }
  878. return false;
  879. }
  880. return false;
  881. }
  882. {
  883. }
  884. {
  885. }
  886. {
  887. }
  888. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement