Advertisement
Guest User

Plotmenu

a guest
Oct 23rd, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Unicon 8.79 KB | None | 0 0
  1.  
  2. Save  New  Duplicate & Edit  Just Text  Twitter
  3. 1
  4. 2
  5. 3
  6. 4
  7. 5
  8. 6
  9. 7
  10. 8
  11. 9
  12. 10
  13. 11
  14. 12
  15. 13
  16. 14
  17. 15
  18. 16
  19. 17
  20. 18
  21. 19
  22. 20
  23. 21
  24. 22
  25. 23
  26. 24
  27. 25
  28. 26
  29. 27
  30. 28
  31. 29
  32. 30
  33. 31
  34. 32
  35. 33
  36. 34
  37. 35
  38. 36
  39. 37
  40. 38
  41. 39
  42. 40
  43. 41
  44. 42
  45. 43
  46. 44
  47. 45
  48. 46
  49. 47
  50. 48
  51. 49
  52. 50
  53. 51
  54. 52
  55. 53
  56. 54
  57. 55
  58. 56
  59. 57
  60. 58
  61. 59
  62. 60
  63. 61
  64. 62
  65. 63
  66. 64
  67. 65
  68. 66
  69. 67
  70. 68
  71. 69
  72. 70
  73. 71
  74. 72
  75. 73
  76. 74
  77. 75
  78. 76
  79. 77
  80. 78
  81. 79
  82. 80
  83. 81
  84. 82
  85. 83
  86. 84
  87. 85
  88. 86
  89. 87
  90. 88
  91. 89
  92. 90
  93. 91
  94. 92
  95. 93
  96. 94
  97. 95
  98. 96
  99. 97
  100. 98
  101. 99
  102. 100
  103. 101
  104. 102
  105. 103
  106. 104
  107. 105
  108. 106
  109. 107
  110. 108
  111. 109
  112. 110
  113. 111
  114. 112
  115. 113
  116. 114
  117. 115
  118. 116
  119. 117
  120. 118
  121. 119
  122. 120
  123. 121
  124. 122
  125. 123
  126. 124
  127. 125
  128. 126
  129. 127
  130. 128
  131. 129
  132. 130
  133. 131
  134. 132
  135. 133
  136. 134
  137. 135
  138. 136
  139. 137
  140. 138
  141. 139
  142. 140
  143. 141
  144. 142
  145. 143
  146. 144
  147. 145
  148. 146
  149. 147
  150. 148
  151. 149
  152. 150
  153. 151
  154. 152
  155. 153
  156. 154
  157. 155
  158. 156
  159. 157
  160. 158
  161. 159
  162. 160
  163. 161
  164. 162
  165. 163
  166. 164
  167. 165
  168. 166
  169. 167
  170. 168
  171. 169
  172. #    PlotMenu
  173. #     v1.1
  174. #     Made by  
  175. #   Johnanater
  176. #
  177. #================
  178. # Needs SkQuery!
  179. #================
  180.  
  181. Options:
  182.     #This is the command to show the main menu (No /)
  183.     PlotMenuCmd: plotmenu
  184.    
  185.     #What should the prefix be?
  186.     Prefix: &c&l[PlotMenu]
  187.    
  188.     #What should the name be? (Changes inventory name, chat name, etc)
  189.     PluginName: &cPlotMenu
  190.    
  191.     #What should people see if they have no permission?
  192.     NoPermissionMsg: Unknown command. Type "/help" for help.
  193.    
  194.     #What should the filler item be?
  195.     FillerItem: stained glass pane
  196.     FillerItemYes: green glass
  197.     FillerItemNo: red glass
  198.    
  199.     #What should the item be for the plot menu?
  200.     Item: clock
  201.    
  202.     #Should PlotMenu work in every world?
  203.     #(True = Works in every world, False = works in the world(s) listed below)
  204.     #Caps matter!
  205.     AllWorlds: False
  206.    
  207.     #What world should it work in? (If above is False)
  208.     #Caps matter!
  209.     TrueWorlds: plots
  210.    
  211.     #What slot should the item be in? Remember the first slot is 0!
  212.     ItemSlot: 8
  213.    
  214.     #DON'T TOUCH THIS
  215.     Version: 1.1
  216.  
  217. #============================================================= 
  218. #Startup/Shutdown Messages/Update Checker
  219. on load:
  220.     send "{@Prefix} {@PluginName} has been enabled." to console
  221.    
  222.     #Update Checker
  223.     set {_ver} to text from url "https://dropbox.com/s/luvcgrnyyb2qjpj/ver.txt?dl=1"
  224.     if {_ver} isn't "{@Version}":
  225.         message "{@Prefix} {@PluginName} is outdated!" to console
  226.         message "{@Prefix} The latest version is %{_ver}%, but you are running {@Version}!" to console
  227. on unload:
  228.     send "{@Prefix} {@PluginName} has been disabled." to console
  229. #=============================================================
  230. #Commands
  231.  
  232. #The menu!
  233. command /{@PlotMenuCmd}: #Main Menu
  234. # Remove the 2 number signs below to add a permission
  235. #   permission: plotmenu.menu
  236. #   permission message: {@NoPermissionMsg}
  237.     executable by: players
  238.     aliases: /plotm # What should the alias be?
  239.     trigger:
  240.         open chest with 5 row named "{@PluginName}" to player
  241.         wait 1 tick
  242.        
  243.         #All of the filler blocks
  244.         loop integers from 0 to 44:
  245.             format slot loop-number of player with {@FillerItem} named "&r" to be unstealable
  246.            
  247.         #All the items (Replacers filler blocks)
  248.         format slot 10 of player with grass named "&a&aClaim this plot" to close then run [execute player command "/plot claim"]
  249.         format slot 19 of player with grass named "&aClaim a random plot" to close then run [execute player command "/plot auto"]
  250.         format slot 28 of player with sign item named "&aPlot info" to close then run [execute player command "/plot info"]
  251.         format slot 12 of player with dirt:2 named "&aDelete your plot" to close then run [execute player command "/plotmenu-del"]
  252.         format slot 21 of player with dirt:1 named "&aClear your plot" to close then run [execute player command "/plotmenu-clear"]
  253.         format slot 30 of player with cake item named "&aRate this plot" to close then run [execute player command "/plotmenu-rate"]
  254.         format slot 14 of player with green wool named "&aAdd friend" to close then run [execute player command "/plot add"]
  255.         format slot 23 of player with red wool named "&aRemove friend" to close then run [execute player command "/plot remove"]
  256.         format slot 32 of player with ender pearl named "&aTPA to someone" to close then run [execute player command "/tpa"]
  257.         format slot 16 of player with bed item named "&aTeleport to your plot" to close then run [execute player command "/plot home"]
  258.         format slot 25 of player with minecart named "&aGoto another plot" to close then run [execute player command "/plot tp "]
  259.         format slot 34 of player with beacon named "&aGoto spawn" to close then run [execute player command "/spawn"]
  260.        
  261.  
  262. #Plot deletion confirmation
  263. command /plotmenu-del: #Deleting Plots
  264.     trigger:
  265.         wait 3 ticks
  266.         open chest with 5 row named "&4Are you sure?" to player
  267.         loop integers from 0 to 44:
  268.             format slot loop-number of player with {@FillerItem} named "&r" to be unstealable
  269.         loop integers from 14 to 16:
  270.             format slot loop-number of player with {@FillerItemYes} named "&aYes, proceed" to close then run [execute player command "/plot del"]
  271.         loop integers from 23 to 25:
  272.             format slot loop-number of player with {@FillerItemYes} named "&aYes, proceed" to close then run [execute player command "/plot del"]
  273.         loop integers from 32 to 34:
  274.             format slot loop-number of player with {@FillerItemYes} named "&aYes, proceed" to close then run [execute player command "/plot del"]
  275.         loop integers from 10 to 12:
  276.             format slot loop-number of player with {@FillerItemNo} named "&4No, cancel" to close
  277.         loop integers from 19 to 21:
  278.             format slot loop-number of player with {@FillerItemNo} named "&4No, cancel" to close
  279.         loop integers from 28 to 30:
  280.             format slot loop-number of player with {@FillerItemNo} named "&4No, cancel" to close
  281.  
  282. #Plot clearation confirmation
  283. command /plotmenu-clear: #Clearing plot
  284.     trigger:
  285.         wait 3 ticks
  286.         open chest with 5 row named "&4Are you sure?" to player
  287.         loop integers from 0 to 44:
  288.             format slot loop-number of player with {@FillerItem} named "&r" to be unstealable
  289.         loop integers from 14 to 16:
  290.             format slot loop-number of player with {@FillerItemYes} named "&aYes, proceed" to close then run [execute player command "/plot clear"]
  291.         loop integers from 23 to 25:
  292.             format slot loop-number of player with {@FillerItemYes} named "&aYes, proceed" to close then run [execute player command "/plot clear"]
  293.         loop integers from 32 to 34:
  294.             format slot loop-number of player with {@FillerItemYes} named "&aYes, proceed" to close then run [execute player command "/plot clear"]
  295.         loop integers from 10 to 12:
  296.             format slot loop-number of player with {@FillerItemNo} named "&4No, cancel" to close
  297.         loop integers from 19 to 21:
  298.             format slot loop-number of player with {@FillerItemNo} named "&4No, cancel" to close
  299.         loop integers from 28 to 30:
  300.             format slot loop-number of player with {@FillerItemNo} named "&4No, cancel" to close
  301.            
  302. #Plot rating menu
  303. command /plotmenu-rate: #Rating system
  304.     trigger:
  305.         wait 3 ticks
  306.         open chest with 2 row named "Pick one" to player
  307.         loop integers from 9 to 17:
  308.             format slot loop-number of player with {@FillerItem} named "&r" to be unstealable
  309.         format slot 0 of player with red glass pane named "1/10" to close then run [execute player command "/plot rate 1"]
  310.         format slot 1 of player with orange glass pane named "2/10" to close then run [execute player command "/plot rate 2"]
  311.         format slot 2 of player with yellow glass pane named "3/10" to close then run [execute player command "/plot rate 3"]
  312.         format slot 3 of player with yellow glass pane named "4/10" to close then run [execute player command "/plot rate 4"]
  313.         format slot 4 of player with gray glass named "5/10" to close then run [execute player command "/plot rate 5"]
  314.         format slot 5 of player with green glass named "6/10" to close then run [execute player command "/plot rate 6"]
  315.         format slot 6 of player with green glass named "7/10" to close then run [execute player command "/plot rate 7"]
  316.         format slot 7 of player with light green glass named "8/10" to close then run [execute player command "/plot rate 8"]
  317.         format slot 8 of player with light green glass named "9/10" to close then run [execute player command "/plot rate 9"]
  318.         format slot 13 of player with pink glass pane named "10/10" to close then run [execute player command "/plot rate 10"]
  319.  
  320. #=============================================================
  321. #Give players the item on join     
  322. on join:
  323.     if "{@AllWorlds}" is "False":
  324.         #To add multiple worlds just add:  or "your world here"
  325.         player is in "{@TrueWorlds}":
  326.             set slot {@ItemSlot} of player to {@Item} named "{@PluginName}"
  327.  
  328. on drop:
  329.     if event-item is {@Item}:
  330.         if display name of event-item contains "{@PluginName}":
  331.             cancel event
  332. #=============================================================
  333. #Check if players open the menu
  334. on right click:
  335.     if player is holding {@Item}:
  336.         loop all items in player's inventory:
  337.             if display name of loop-item contains "{@PluginName}":
  338.                 execute player command "{@PlotMenuCmd}"
  339.                 stop loop
  340. #=============================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement