ArtzifyHD

1.9 Golden Apples

Aug 24th, 2017
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. command /ga <text>:
  2. permission: ga.admin
  3. executable by: players
  4. description: Allows certain aspects of the skript to be utilized
  5. usage: /ga [enable - disable - noapples - yesapples]
  6. permission message: You do not have permission to do this!
  7. trigger:
  8. if argument 1 is "enable":
  9. set {ga.use} to true
  10. broadcast "&7%newline% This server is currently using &c1.9 Golden Apples &7created by &cFrostedWeFall!%newline%"
  11. if argument 1 is "disable":
  12. set {ga.use} to false
  13. message "&71.9 Golden Apples is now &3disabled&7!"
  14. if argument 1 is "noapples":
  15. set {ga.craft} to false
  16. message "&7Eating/Crafting of Golden Apples is now &3disabled&7!"
  17. if argument 1 is "yesapples":
  18. set {ga.craft} to true
  19. message "&7Eating/Crafting of Golden Apples is now &3enabled&7!"
  20.  
  21. on eating of enchanted golden apple:
  22. if {ga.craft} is false:
  23. cancel event
  24. message "&c&lYou cannot eat god apples!"
  25. stop
  26. if {ga.use} is false:
  27. stop
  28. wait 1 tick
  29. remove regeneration from the player
  30. remove Absorption from the player
  31. remove Fire Resistance from the player
  32. remove resistance from the player
  33. message "&7You just ate a &31.9 &6God Apple&7!"
  34. apply regeneration 2 to the player for 20 seconds
  35. apply Absorption 4 to the player for 120 seconds
  36. apply Fire Resistance to the player for 300 seconds
  37. apply resistance to the player for 300 seconds
  38.  
  39. on eating of golden apple:
  40. if {ga.craft} is false:
  41. cancel event
  42. message "&c&lYou cannot eat golden apples!"
  43. stop
  44. if {ga.use} is false:
  45. stop
  46. wait 1 tick
  47. remove regeneration from the player
  48. remove Absorption from the player
  49. apply regeneration to the player for 5 seconds
  50. apply Absorption to the player for 120 seconds
  51.  
  52. on craft of enchanted golden apple:
  53. if {ga.craft} is false:
  54. cancel event
  55. message "&c&lYou cannot craft god apples!"
  56.  
  57. on craft of golden apple:
  58. if {ga.craft} is false:
  59. cancel event
  60. message "&c&lYou cannot craft golden apples!"
  61.  
  62. on rightclick holding a golden apple:
  63. if gamemode of player is creative:
  64. if {ga.craft} is false:
  65. cancel event
  66. stop
  67. if {ga.use} is false:
  68. stop
  69. remove regeneration from the player
  70. remove Absorption from the player
  71. apply regeneration to the player for 5 seconds
  72. apply Absorption to the player for 120 seconds
  73. remove 1 golden apple from player
  74.  
  75. on rightclick holding a enchanted golden apple:
  76. if gamemode of player is creative:
  77. if {ga.craft} is false:
  78. cancel event
  79. stop
  80. if {ga.use} is false:
  81. stop
  82. message "&7You just ate a &31.9 &6God Apple&7!"
  83. remove regeneration from the player
  84. remove Absorption from the player
  85. remove Fire Resistance from the player
  86. remove resistance from the player
  87. apply regeneration 2 to the player for 20 seconds
  88. apply Absorption 4 to the player for 120 seconds
  89. apply Fire Resistance to the player for 300 seconds
  90. apply resistance to the player for 300 seconds
  91. remove 1 enchanted golden apple from player
Advertisement
Add Comment
Please, Sign In to add comment