Advertisement
Guest User

EasyHomes OFFICIAL code #Opensource

a guest
Jan 24th, 2021
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.74 KB | None | 0 0
  1. #OpenSource
  2. #EasyHomes V3.2.19 by Green_GamerNL
  3.  
  4. #Copyright
  5. #Official CODE
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. #EasyHomes by Green_GamerNL/GreenGamer42
  20. #Thanks for downloading!
  21. #
  22. #Please do not change the code.
  23. #Please do not use my code.
  24. #Please do not upload my code.
  25. #
  26. #For support, join my discord server here: https://discord.gg/NYu4VST
  27. #If you like my resource, please consider rating at Spigot!
  28.  
  29. on load:
  30. if file "plugins/EasyHomes/config.yml" doesn't exist:
  31. create file "plugins/EasyHomes/config.yml"
  32. write "##The prefix." at line 1 to file "plugins/EasyHomes/config.yml"
  33. write "prefix: $e$[$a$EasyHomes$e$]" at line 2 to file "plugins/EasyHomes/config.yml"
  34. write "##The warmup duration in seconds. Set to 0 if you want to disable this." at line 4 to file "plugins/EasyHomes/config.yml"
  35. write "warmup: 3" at line 5 to file "plugins/EasyHomes/config.yml"
  36. write "##Maximum amount of homes players can set (Do not set this to a high number, it can cause lag)" at line 7 to file "plugins/EasyHomes/config.yml"
  37. write "maxhomes: 5" at line 8 to file "plugins/EasyHomes/config.yml"
  38. write "##Do you want to use the normal prefix at a error? If false, it will use the customerrorprefix instead." at line 10 to file "plugins/EasyHomes/config.yml"
  39. write "prefixonerror: false" at line 11 to file "plugins/EasyHomes/config.yml"
  40. write "customerrorprefix: $4$ERROR," at line 12 to file "plugins/EasyHomes/config.yml"
  41. write "##Sign options" at line 14 to file "plugins/EasyHomes/config.yml"
  42. write "usesigns: true" at line 15 to file "plugins/EasyHomes/config.yml"
  43. if file "plugins/EasyHomes/permissions.yml" doesn't exist:
  44. create file "plugins/EasyHomes/permissions.yml"
  45. write "##/sethome" at line 1 to file "plugins/EasyHomes/permissions.yml"
  46. write "sethome: easyhomes.sethome" at line 2 to file "plugins/EasyHomes/permissions.yml"
  47. write "##/delhome" at line 4 to file "plugins/EasyHomes/permissions.yml"
  48. write "delhome: easyhomes.delhome" at line 5 to file "plugins/EasyHomes/permissions.yml"
  49. write "##/homes" at line 7 to file "plugins/EasyHomes/permissions.yml"
  50. write "homeslist: easyhomes.homes" at line 8 to file "plugins/EasyHomes/permissions.yml"
  51. write "##/home" at line 10 to file "plugins/EasyHomes/permissions.yml"
  52. write "hometeleport: easyhomes.home" at line 11 to file "plugins/EasyHomes/permissions.yml"
  53. write "##/easyhomes info" at line 13 to file "plugins/EasyHomes/permissions.yml"
  54. write "infocommand: easyhomes.info" at line 14 to file "plugins/EasyHomes/permissions.yml"
  55. write "##/easyhomes reload" at line 16 to file "plugins/EasyHomes/permissions.yml"
  56. write "reloadcommand: easyhomes.reload" at line 17 to file "plugins/EasyHomes/permissions.yml"
  57. write "##/easyhomes help" at line 19 to file "plugins/EasyHomes/permissions.yml"
  58. write "helpcommand: easyhomes.help" at line 20 to file "plugins/EasyHomes/permissions.yml"
  59. write "##/easyhomes help" at line 22 to file "plugins/EasyHomes/permissions.yml"
  60. write "debugcommand: easyhomes.debugpaste" at line 23 to file "plugins/EasyHomes/permissions.yml"
  61. write "##Sign Permissions" at line 25 to file "plugins/EasyHomes/permissions.yml"
  62. write "usesigns: easyhomes.usesigns" at line 26 to file "plugins/EasyHomes/permissions.yml"
  63. write "placesigns: easyhomes.placesigns" at line 27 to file "plugins/EasyHomes/permissions.yml"
  64. write "##Other permissions" at line 29 to file "plugins/EasyHomes/permissions.yml"
  65. write "##The permission must end with a '.'. The permission will be yourperm.<number of homes players can set>." at line 31 to file "plugins/EasyHomes/permissions.yml"
  66. write "maxhomes: easyhomes.maxhomes." at line 32 to file "plugins/EasyHomes/permissions.yml"
  67. if file "plugins/EasyHomes/worlds.yml" doesn't exist:
  68. create file "plugins/EasyHomes/worlds.yml"
  69. add "world" to yaml list "worlds" of file "plugins/EasyHomes/worlds.yml"
  70. add "world_nether" to yaml list "worlds" of file "plugins/EasyHomes/worlds.yml"
  71. add "world_end" to yaml list "worlds" of file "plugins/EasyHomes/worlds.yml"
  72. if file "plugins/EasyHomes/messages.yml" doesn't exist:
  73. create file "plugins/EasyHomes/messages.yml"
  74. write "##Errors, (no colorcodes supported!)." at line 1 to file "plugins/EasyHomes/messages.yml"
  75. write "noperm: You don't have permission!" at line 2 to file "plugins/EasyHomes/messages.yml"
  76. write "homealreadyexist: That home is already set!" at line 3 to file "plugins/EasyHomes/messages.yml"
  77. write "homedoesntexist: That home doesn't exits!" at line 4 to file "plugins/EasyHomes/messages.yml"
  78. write "maxhomesreached: Maximum homes reached!" at line 5 to file "plugins/EasyHomes/messages.yml"
  79. write "donthaveanyhomes: You don't have any homes!" at line 6 to file "plugins/EasyHomes/messages.yml"
  80. write "inwarmup: You are in warmup!" at line 7 to file "plugins/EasyHomes/messages.yml"
  81. write "wrongworld: You cannot do this here!" at line 8 to file "plugins/EasyHomes/messages.yml"
  82. write "##Sethome command." at line 10 to file "plugins/EasyHomes/messages.yml"
  83. write "homeset: $3$Home $d$$home$ $a$set!" at line 11 to file "plugins/EasyHomes/messages.yml"
  84. write "##Delhome command." at line 13 to file "plugins/EasyHomes/messages.yml"
  85. write "homedeleted: $3$Home $d$$home$ $c$deleted!" at line 14 to file "plugins/EasyHomes/messages.yml"
  86. write "##Home command." at line 16 to file "plugins/EasyHomes/messages.yml"
  87. write "teleportedtohome: $3$You have been telepored to home $d$$home$!" at line 17 to file "plugins/EasyHomes/messages.yml"
  88. write "teleportwarmup: $c$Teleporting to home $d$$home$ $c$in $e$$warmup$ seconds..." at line 18 to file "plugins/EasyHomes/messages.yml"
  89. set {easyhomes.config::prefix} to yaml value "prefix" of file "plugins/EasyHomes/config.yml"
  90. set {easyhomes.config::warmup} to yaml value "warmup" of file "plugins/EasyHomes/config.yml"
  91. set {easyhomes.config::maxhomes} to yaml value "maxhomes" of file "plugins/EasyHomes/config.yml"
  92. set {easyhomes.config::prefixonerror} to yaml value "prefixonerror" of file "plugins/EasyHomes/config.yml"
  93. set {easyhomes.config::customerrorprefix} to yaml value "customerrorprefix" of file "plugins/EasyHomes/config.yml"
  94. set {easyhomes.config::usesigns} to yaml value "usesigns" of file "plugins/EasyHomes/config.yml"
  95. set {easyhomes.message::noperm} to yaml value "noperm" of file "plugins/EasyHomes/messages.yml"
  96. set {easyhomes.message::homealreadyexist} to yaml value "homealreadyexist" of file "plugins/EasyHomes/messages.yml"
  97. set {easyhomes.message::homedoesntexist} to yaml value "homedoesntexist" of file "plugins/EasyHomes/messages.yml"
  98. set {easyhomes.message::maxhomesreached} to yaml value "maxhomesreached" of file "plugins/EasyHomes/messages.yml"
  99. set {easyhomes.message::donthaveanyhomes} to yaml value "donthaveanyhomes" of file "plugins/EasyHomes/messages.yml"
  100. set {easyhomes.message::inwarmup} to yaml value "inwarmup" of file "plugins/EasyHomes/messages.yml"
  101. set {easyhomes.message::wrongworld} to yaml value "wrongworld" of file "plugins/EasyHomes/messages.yml"
  102. set {easyhomes.message::homeset} to yaml value "homeset" of file "plugins/EasyHomes/messages.yml"
  103. set {easyhomes.message::homedeleted} to yaml value "homedeleted" of file "plugins/EasyHomes/messages.yml"
  104. set {easyhomes.message::teleportedtohome} to yaml value "teleportedtohome" of file "plugins/EasyHomes/messages.yml"
  105. set {easyhomes.message::teleportwarmup} to yaml value "teleportwarmup" of file "plugins/EasyHomes/messages.yml"
  106. set {easyhomes.worlds::*} to yaml list "worlds" of file "plugins/EasyHomes/worlds.yml"
  107. set {easyhomes.permissions::sethome} to yaml value "sethome" of file "plugins/EasyHomes/permissions.yml"
  108. set {easyhomes.permissions::delhome} to yaml value "delhome" of file "plugins/EasyHomes/permissions.yml"
  109. set {easyhomes.permissions::homeslist} to yaml value "homeslist" of file "plugins/EasyHomes/permissions.yml"
  110. set {easyhomes.permissions::hometeleport} to yaml value "hometeleport" of file "plugins/EasyHomes/permissions.yml"
  111. set {easyhomes.permissions::infocommand} to yaml value "infocommand" of file "plugins/EasyHomes/permissions.yml"
  112. set {easyhomes.permissions::helpcommand} to yaml value "helpcommand" of file "plugins/EasyHomes/permissions.yml"
  113. set {easyhomes.permissions::reloadcommand} to yaml value "reloadcommand" of file "plugins/EasyHomes/permissions.yml"
  114. set {easyhomes.permissions::debugcommand} to yaml value "debugcommand" of file "plugins/EasyHomes/permissions.yml"
  115. set {easyhomes.permissions::maxhomes} to yaml value "maxhomes" of file "plugins/EasyHomes/permissions.yml"
  116. set {easyhomes.permissions::placesigns} to yaml value "placesigns" of file "plugins/EasyHomes/permissions.yml"
  117. set {easyhomes.permissions::usesigns} to yaml value "usesigns" of file "plugins/EasyHomes/permissions.yml"
  118. replace all "$0$" with "<black>" in {easyhomes.config::prefix}
  119. replace all "$1$" with "<dark blue>" in {easyhomes.config::prefix}
  120. replace all "$2$" with "<dark green>" in {easyhomes.config::prefix}
  121. replace all "$3$" with "<dark aqua>" in {easyhomes.config::prefix}
  122. replace all "$4$" with "<dark red>" in {easyhomes.config::prefix}
  123. replace all "$5$" with "<dark purple>" in {easyhomes.config::prefix}
  124. replace all "$6$" with "<gold>" in {easyhomes.config::prefix}
  125. replace all "$7$" with "<gray>" in {easyhomes.config::prefix}
  126. replace all "$8$" with "<dark gray>" in {easyhomes.config::prefix}
  127. replace all "$9$" with "<light blue>" in {easyhomes.config::prefix}
  128. replace all "$a$" with "<light green>" in {easyhomes.config::prefix}
  129. replace all "$b$" with "<light aqua>" in {easyhomes.config::prefix}
  130. replace all "$c$" with "<light red>" in {easyhomes.config::prefix}
  131. replace all "$d$" with "<light purple>" in {easyhomes.config::prefix}
  132. replace all "$e$" with "<yellow>" in {easyhomes.config::prefix}
  133. replace all "$f$" with "<white>" in {easyhomes.config::prefix}
  134. replace all "$l$" with "<b>" in {easyhomes.config::prefix}
  135. replace all "$k$" with "<magic>" in {easyhomes.config::prefix}
  136. replace all "$m$" with "<strike>" in {easyhomes.config::prefix}
  137. replace all "$n$" with "<underlined>" in {easyhomes.config::prefix}
  138. replace all "$o$" with "<italic>" in {easyhomes.config::prefix}
  139. replace all "$r$" with "<reset>" in {easyhomes.config::prefix}
  140. replace all "$0$" with "<black>" in {easyhomes.config::customerrorprefix}
  141. replace all "$1$" with "<dark blue>" in {easyhomes.config::customerrorprefix}
  142. replace all "$2$" with "<dark green>" in {easyhomes.config::customerrorprefix}
  143. replace all "$3$" with "<dark aqua>" in {easyhomes.config::customerrorprefix}
  144. replace all "$4$" with "<dark red>" in {easyhomes.config::customerrorprefix}
  145. replace all "$5$" with "<dark purple>" in {easyhomes.config::customerrorprefix}
  146. replace all "$6$" with "<gold>" in {easyhomes.config::customerrorprefix}
  147. replace all "$7$" with "<gray>" in {easyhomes.config::customerrorprefix}
  148. replace all "$8$" with "<dark gray>" in {easyhomes.config::customerrorprefix}
  149. replace all "$9$" with "<light blue>" in {easyhomes.config::customerrorprefix}
  150. replace all "$a$" with "<light green>" in {easyhomes.config::customerrorprefix}
  151. replace all "$b$" with "<light aqua>" in {easyhomes.config::customerrorprefix}
  152. replace all "$c$" with "<light red>" in {easyhomes.config::customerrorprefix}
  153. replace all "$d$" with "<light purple>" in {easyhomes.config::customerrorprefix}
  154. replace all "$e$" with "<yellow>" in {easyhomes.config::customerrorprefix}
  155. replace all "$f$" with "<white>" in {easyhomes.config::customerrorprefix}
  156. replace all "$l$" with "<b>" in {easyhomes.config::customerrorprefix}
  157. replace all "$k$" with "<magic>" in {easyhomes.config::customerrorprefix}
  158. replace all "$m$" with "<strike>" in {easyhomes.config::customerrorprefix}
  159. replace all "$n$" with "<underlined>" in {easyhomes.config::customerrorprefix}
  160. replace all "$o$" with "<italic>" in {easyhomes.config::customerrorprefix}
  161. replace all "$r$" with "<reset>" in {easyhomes.config::customerrorprefix}
  162. replace all "$0$" with "<black>" in {easyhomes.message::homeset}
  163. replace all "$1$" with "<dark blue>" in {easyhomes.message::homeset}
  164. replace all "$2$" with "<dark green>" in {easyhomes.message::homeset}
  165. replace all "$3$" with "<dark aqua>" in {easyhomes.message::homeset}
  166. replace all "$4$" with "<dark red>" in {easyhomes.message::homeset}
  167. replace all "$5$" with "<dark purple>" in {easyhomes.message::homeset}
  168. replace all "$6$" with "<gold>" in {easyhomes.message::homeset}
  169. replace all "$7$" with "<gray>" in {easyhomes.message::homeset}
  170. replace all "$8$" with "<dark gray>" in {easyhomes.message::homeset}
  171. replace all "$9$" with "<light blue>" in {easyhomes.message::homeset}
  172. replace all "$a$" with "<light green>" in {easyhomes.message::homeset}
  173. replace all "$b$" with "<light aqua>" in {easyhomes.message::homeset}
  174. replace all "$c$" with "<light red>" in {easyhomes.message::homeset}
  175. replace all "$d$" with "<light purple>" in {easyhomes.message::homeset}
  176. replace all "$e$" with "<yellow>" in {easyhomes.message::homeset}
  177. replace all "$f$" with "<white>" in {easyhomes.message::homeset}
  178. replace all "$l$" with "<b>" in {easyhomes.message::homeset}
  179. replace all "$k$" with "<magic>" in {easyhomes.message::homeset}
  180. replace all "$m$" with "<strike>" in {easyhomes.message::homeset}
  181. replace all "$n$" with "<underlined>" in {easyhomes.message::homeset}
  182. replace all "$o$" with "<italic>" in {easyhomes.message::homeset}
  183. replace all "$r$" with "<reset>" in {easyhomes.message::homeset}
  184. replace all "$0$" with "<black>" in {easyhomes.message::homedeleted}
  185. replace all "$1$" with "<dark blue>" in {easyhomes.message::homedeleted}
  186. replace all "$2$" with "<dark green>" in {easyhomes.message::homedeleted}
  187. replace all "$3$" with "<dark aqua>" in {easyhomes.message::homedeleted}
  188. replace all "$4$" with "<dark red>" in {easyhomes.message::homedeleted}
  189. replace all "$5$" with "<dark purple>" in {easyhomes.message::homedeleted}
  190. replace all "$6$" with "<gold>" in {easyhomes.message::homedeleted}
  191. replace all "$7$" with "<gray>" in {easyhomes.message::homedeleted}
  192. replace all "$8$" with "<dark gray>" in {easyhomes.message::homedeleted}
  193. replace all "$9$" with "<light blue>" in {easyhomes.message::homedeleted}
  194. replace all "$a$" with "<light green>" in {easyhomes.message::homedeleted}
  195. replace all "$b$" with "<light aqua>" in {easyhomes.message::homedeleted}
  196. replace all "$c$" with "<light red>" in {easyhomes.message::homedeleted}
  197. replace all "$d$" with "<light purple>" in {easyhomes.message::homedeleted}
  198. replace all "$e$" with "<yellow>" in {easyhomes.message::homedeleted}
  199. replace all "$f$" with "<white>" in {easyhomes.message::homedeleted}
  200. replace all "$l$" with "<b>" in {easyhomes.message::homedeleted}
  201. replace all "$k$" with "<magic>" in {easyhomes.message::homedeleted}
  202. replace all "$m$" with "<strike>" in {easyhomes.message::homedeleted}
  203. replace all "$n$" with "<underlined>" in {easyhomes.message::homedeleted}
  204. replace all "$o$" with "<italic>" in {easyhomes.message::homedeleted}
  205. replace all "$r$" with "<reset>" in {easyhomes.message::homedeleted}
  206. replace all "$0$" with "<black>" in {easyhomes.message::teleportedtohome}
  207. replace all "$1$" with "<dark blue>" in {easyhomes.message::teleportedtohome}
  208. replace all "$2$" with "<dark green>" in {easyhomes.message::teleportedtohome}
  209. replace all "$3$" with "<dark aqua>" in {easyhomes.message::teleportedtohome}
  210. replace all "$4$" with "<dark red>" in {easyhomes.message::teleportedtohome}
  211. replace all "$5$" with "<dark purple>" in {easyhomes.message::teleportedtohome}
  212. replace all "$6$" with "<gold>" in {easyhomes.message::teleportedtohome}
  213. replace all "$7$" with "<gray>" in {easyhomes.message::teleportedtohome}
  214. replace all "$8$" with "<dark gray>" in {easyhomes.message::teleportedtohome}
  215. replace all "$9$" with "<light blue>" in {easyhomes.message::teleportedtohome}
  216. replace all "$a$" with "<light green>" in {easyhomes.message::teleportedtohome}
  217. replace all "$b$" with "<light aqua>" in {easyhomes.message::teleportedtohome}
  218. replace all "$c$" with "<light red>" in {easyhomes.message::teleportedtohome}
  219. replace all "$d$" with "<light purple>" in {easyhomes.message::teleportedtohome}
  220. replace all "$e$" with "<yellow>" in {easyhomes.message::teleportedtohome}
  221. replace all "$f$" with "<white>" in {easyhomes.message::teleportedtohome}
  222. replace all "$l$" with "<b>" in {easyhomes.message::teleportedtohome}
  223. replace all "$k$" with "<magic>" in {easyhomes.message::teleportedtohome}
  224. replace all "$m$" with "<strike>" in {easyhomes.message::teleportedtohome}
  225. replace all "$n$" with "<underlined>" in {easyhomes.message::teleportedtohome}
  226. replace all "$o$" with "<italic>" in {easyhomes.message::teleportedtohome}
  227. replace all "$r$" with "<reset>" in {easyhomes.message::teleportedtohome}
  228. replace all "$0$" with "<black>" in {easyhomes.message::teleportwarmup}
  229. replace all "$1$" with "<dark blue>" in {easyhomes.message::teleportwarmup}
  230. replace all "$2$" with "<dark green>" in {easyhomes.message::teleportwarmup}
  231. replace all "$3$" with "<dark aqua>" in {easyhomes.message::teleportwarmup}
  232. replace all "$4$" with "<dark red>" in {easyhomes.message::teleportwarmup}
  233. replace all "$5$" with "<dark purple>" in {easyhomes.message::teleportwarmup}
  234. replace all "$6$" with "<gold>" in {easyhomes.message::teleportwarmup}
  235. replace all "$7$" with "<gray>" in {easyhomes.message::teleportwarmup}
  236. replace all "$8$" with "<dark gray>" in {easyhomes.message::teleportwarmup}
  237. replace all "$9$" with "<light blue>" in {easyhomes.message::teleportwarmup}
  238. replace all "$a$" with "<light green>" in {easyhomes.message::teleportwarmup}
  239. replace all "$b$" with "<light aqua>" in {easyhomes.message::teleportwarmup}
  240. replace all "$c$" with "<light red>" in {easyhomes.message::teleportwarmup}
  241. replace all "$d$" with "<light purple>" in {easyhomes.message::teleportwarmup}
  242. replace all "$e$" with "<yellow>" in {easyhomes.message::teleportwarmup}
  243. replace all "$f$" with "<white>" in {easyhomes.message::teleportwarmup}
  244. replace all "$l$" with "<b>" in {easyhomes.message::teleportwarmup}
  245. replace all "$k$" with "<magic>" in {easyhomes.message::teleportwarmup}
  246. replace all "$m$" with "<strike>" in {easyhomes.message::teleportwarmup}
  247. replace all "$n$" with "<underlined>" in {easyhomes.message::teleportwarmup}
  248. replace all "$o$" with "<italic>" in {easyhomes.message::teleportwarmup}
  249. replace all "$r$" with "<reset>" in {easyhomes.message::teleportwarmup}
  250.  
  251. on join:
  252. if file "plugins/EasyHomes/data/%player's uuid%" doesn't exist:
  253. create file "plugins/EasyHomes/data/%player's uuid%.yml"
  254.  
  255. command /sethome [<text>]:
  256. executable by: players
  257. trigger:
  258. if {easyhomes.worlds::*} contains "%player's world%":
  259. if player has permission "%{easyhomes.permissions::sethome}%":
  260. if arg 1 is set:
  261. set {_t} to size of {easyhomes.homes.%player's uuid%::*} + 1
  262. set {_count} to "%{easyhomes.config::maxhomes}%" parsed as integer
  263. loop {easyhomes.config::maxhomes} times:
  264. remove 1 from {_count}
  265. set {_c} to "%{_count}%" parsed as integer
  266. if player has permission "%{easyhomes.permissions::maxhomes}%%{_count}%":
  267. if {_t} is not greater than {_c}:
  268. if {easyhomes.home.%arg 1%.%player's uuid%} is not set:
  269. set {easyhomes.home.%arg 1%.%player's uuid%} to location of player
  270. add arg-1 to {easyhomes.homes.%player's uuid%::*}
  271. set {easyhomes.sethome.message.%player's uuid%} to "%{easyhomes.message::homeset}%"
  272. replace all "$home$" with arg 1 in {easyhomes.sethome.message.%player's uuid%}
  273. send colored "%{easyhomes.config::prefix}% %{easyhomes.sethome.message.%player's uuid%}%"
  274. add "%arg 1%: %player's location% %player's world%" to yaml list "homes.%{_t}%" of file "plugins/EasyHomes/data/%player's uuid%.yml"
  275. stop
  276. else:
  277. if {easyhomes.config::prefixonerror} is true:
  278. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::homealreadyexist}%"
  279. stop
  280. if {easyhomes.config::prefixonerror} is false:
  281. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::homealreadyexist}%"
  282. stop
  283. else:
  284. if {easyhomes.config::prefixonerror} is true:
  285. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::maxhomesreached}%"
  286. stop
  287. if {easyhomes.config::prefixonerror} is false:
  288. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::maxhomesreached}%"
  289. stop
  290. else:
  291. if {easyhomes.config::prefixonerror} is true:
  292. send colored "%{easyhomes.config::prefix}% &c/sethome <home>"
  293. stop
  294. if {easyhomes.config::prefixonerror} is false:
  295. send colored "%{easyhomes.config::customerrorprefix}% &c/sethome <home>"
  296. stop
  297. else:
  298. if {easyhomes.config::prefixonerror} is true:
  299. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  300. stop
  301. if {easyhomes.config::prefixonerror} is false:
  302. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  303. stop
  304. else:
  305. if {easyhomes.config::prefixonerror} is true:
  306. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::wrongworld}%"
  307. stop
  308. if {easyhomes.config::prefixonerror} is false:
  309. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::wrongworld}%"
  310. stop
  311.  
  312. command /delhome [<text>]:
  313. executable by: players
  314. trigger:
  315. if {easyhomes.worlds::*} contains "%player's world%":
  316. if player has permission "%{easyhomes.permissions::delhome}%":
  317. if arg 1 is set:
  318. if {easyhomes.home.%arg 1%.%player's uuid%} is set:
  319. set {_t} to size of {easyhomes.homes.%player's uuid%::*}
  320. delete {easyhomes.home.%arg 1%.%player's uuid%}
  321. remove arg-1 from {easyhomes.homes.%player's uuid%::*}
  322. set {_message} to "%{easyhomes.message::homedeleted}%"
  323. replace all "$home$" with arg 1 in {_message}
  324. send colored "%{easyhomes.config::prefix}% %{_message}%"
  325. delete skutil yaml nodes "homes.%{_t}%" from file "plugins/EasyHomes/data/%player's uuid%.yml"
  326. stop
  327. else:
  328. if {easyhomes.config::prefixonerror} is true:
  329. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::homedoesntexist}%"
  330. stop
  331. if {easyhomes.config::prefixonerror} is false:
  332. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::homedoesntexist}%"
  333. stop
  334. else:
  335. if {easyhomes.config::prefixonerror} is true:
  336. send colored "%{easyhomes.config::prefix}% &c/delhome <home>"
  337. stop
  338. if {easyhomes.config::prefixonerror} is false:
  339. send colored "%{easyhomes.config::customerrorprefix}% &c/delhome <home>"
  340. stop
  341. else:
  342. if {easyhomes.config::prefixonerror} is true:
  343. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  344. stop
  345. if {easyhomes.config::prefixonerror} is false:
  346. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  347. stop
  348. else:
  349. if {easyhomes.config::prefixonerror} is true:
  350. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::wrongworld}%"
  351. stop
  352. if {easyhomes.config::prefixonerror} is false:
  353. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::wrongworld}%"
  354. stop
  355. command /homes:
  356. executable by: players
  357. trigger:
  358. if {easyhomes.worlds::*} contains "%player's world%":
  359. if player has permission "%{easyhomes.permissions::homeslist}%":
  360. set {_var} to size of {easyhomes.homes.%player's uuid%::*}
  361. if {_var} is more than 0:
  362. send colored "&cYour homes:"
  363. loop {easyhomes.homes.%player's uuid%::*}:
  364. send colored "&7- &d%loop-value%"
  365. stop
  366. else:
  367. if {easyhomes.config::prefixonerror} is true:
  368. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::donthaveanyhomes}%"
  369. stop
  370. if {easyhomes.config::prefixonerror} is false:
  371. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::donthaveanyhomes}%"
  372. stop
  373. else:
  374. if {easyhomes.config::prefixonerror} is true:
  375. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  376. stop
  377. if {easyhomes.config::prefixonerror} is false:
  378. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  379. stop
  380. else:
  381. if {easyhomes.config::prefixonerror} is true:
  382. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::wrongworld}%"
  383. stop
  384. if {easyhomes.config::prefixonerror} is false:
  385. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::wrongworld}%"
  386. stop
  387.  
  388. command /home [<text>]:
  389. executable by: players
  390. trigger:
  391. if {easyhomes.worlds::*} contains "%player's world%":
  392. if player has permission "%{easyhomes.permissions::hometeleport}%":
  393. if arg 1 is set:
  394. if {easyhomes.warmup.%player's uuid%} is not set:
  395. if {easyhomes.home.%arg 1%.%player's uuid%} is set:
  396. if {easyhomes.config::warmup} is 0:
  397. teleport player to {easyhomes.home.%arg 1%.%player's uuid%}
  398. set {easyhomes.lastteleported.%player's uuid%} to now
  399. set {_message} to "%{easyhomes.message::teleportedtohome}%"
  400. replace all "$home$" with arg 1 in {_message}
  401. send colored "%{easyhomes.config::prefix}% %{_message}%"
  402. stop
  403. else:
  404. set {easyhomes.warmup.%player's uuid%} to true
  405. set {_message} to "%{easyhomes.message::teleportwarmup}%"
  406. replace all "$home$" with arg 1 in {_message}
  407. replace all "$warmup$" with "%{easyhomes.config::warmup}%" in {_message}
  408. send colored "%{easyhomes.config::prefix}% %{_message}%"
  409. loop {easyhomes.config::warmup} times:
  410. wait 1 second
  411. teleport player to {easyhomes.home.%arg 1%.%player's uuid%}
  412. delete {easyhomes.warmup.%player's uuid%}
  413. set {_message} to "%{easyhomes.message::teleportedtohome}%"
  414. replace all "$home$" with arg 1 in {_message}
  415. send colored "%{easyhomes.config::prefix}% %{_message}%"
  416. stop
  417. else:
  418. if {easyhomes.config::prefixonerror} is true:
  419. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::homedoesntexist}%"
  420. stop
  421. if {easyhomes.config::prefixonerror} is false:
  422. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::homedoesntexist}%"
  423. stop
  424. else:
  425. if {easyhomes.onfig::prefixonerror} is true:
  426. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::inwarmup}%"
  427. stop
  428. if {easyhomes.config::prefixonerror} is false:
  429. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::inwarmup}%"
  430. stop
  431. else:
  432. if {easyhomes.config::prefixonerror} is false:
  433. send colored "%{easyhomes.config::prefix}% &c/home <home>"
  434. stop
  435. if {easyhomes.config::prefixonerror} is true:
  436. send colored "%{easyhomes.config::customerrorprefix}% &c/home <home>"
  437. stop
  438. else:
  439. if {easyhomes.config::prefixonerror} is true:
  440. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  441. stop
  442. if {easyhomes.config::prefixonerror} is false:
  443. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  444. stop
  445. else:
  446. if {easyhomes.config::prefixonerror} is true:
  447. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::wrongworld}%"
  448. stop
  449. if {easyhomes.config::prefixonerror} is false:
  450. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::wrongworld}%"
  451. stop
  452.  
  453. command /easyhomes [<text>]:
  454. executable by: players
  455. trigger:
  456. if arg 1 is "reload":
  457. if player has permission "%{easyhomes.permissions::reloadcommand}%":
  458. send "%{easyhomes.config::prefix}% &aEasyHomes reloaded!"
  459. execute console command "sk reload EasyHomes"
  460. stop
  461. else:
  462. if {easyhomes.config::prefixonerror} is true:
  463. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  464. stop
  465. if {easyhomes.config::prefixonerror} is false:
  466. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  467. stop
  468. if arg 1 is "help":
  469. if player has permission "%{easyhomes.permissions::helpcommand}%":
  470. send "&cEasyHomes:"
  471. send "&e/sethome <home> &7- Create a home!"
  472. send "&e/delhome <home> &7- Delete a home!"
  473. send "&e/homes &7- See all your homes!"
  474. send "&e/home <home> &7- Teleport to your home!"
  475. send "&e/easyhomes reload &7- Reload EasyHomes config!"
  476. send "&e/easyhomes help &7- Get this message!"
  477. send "&e/easyhomes debugpaste &7- Debugging!"
  478. stop
  479. else:
  480. if {easyhomes.config::prefixonerror} is true:
  481. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  482. stop
  483. if {easyhomes.config::prefixonerror} is false:
  484. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  485. stop
  486. if arg 1 is "info":
  487. if player has permission "%{easyhomes.permissions::infocommand}%":
  488. send "&c&lEasyHomes &eby &aGreen_GamerNL"
  489. send "&bYou are using version &d3.2.19"
  490. send " "
  491. send "&7Do &e/easyhomes help &7for a list of all commands."
  492. stop
  493. else:
  494. if {easyhomes.config::prefixonerror} is true:
  495. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  496. stop
  497. if {easyhomes.config::prefixonerror} is false:
  498. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  499. stop
  500. if arg 1 is "debugpaste":
  501. if player has permission "%{easyhomes.permissions::debugcommand}%":
  502. create file "plugins/EasyHomes/debugpaste.yml"
  503. send "&aSuccesfully created file &cdebugpaste.yml&a. All debug information is located there."
  504. write "%now%" at line 1 to file "plugins/EasyHomes/debugpaste.yml"
  505. write "##This is a debug file. Please send this to our discord server or message the author on Spigot, when you have problems using EasyHomes" at line 2 to file "plugins/EasyHomes/debugpaste.yml"
  506. write "##After sending it to our discord or the author, you can remove this file." at line 3 to file "plugins/EasyHomes/debugpaste.yml"
  507. write "Version: 3.2.19" at line 4 to file "plugins/EasyHomes/debugpaste.yml"
  508. write "Server Version: %minecraft version%" at line 5 to file "plugins/EasyHomes/debugpaste.yml"
  509. write "Bukkit Version: %bukkit version%" at line 6 to file "plugins/EasyHomes/debugpaste.yml"
  510. write "Skript Version: %skript version%" at line 7 to file "plugins/EasyHomes/debugpaste.yml"
  511. write " " at line 8 to file "plugins/EasyHomes/debugpaste.yml"
  512. stop
  513. else:
  514. if {easyhomes.config::prefixonerror} is true:
  515. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  516. stop
  517. if {easyhomes.config::prefixonerror} is false:
  518. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  519. stop
  520. else:
  521. if player has permission "%{easyhomes.permissions::infocommand}%":
  522. send "&c&lEasyHomes &eby &aGreen_GamerNL"
  523. send "&bYou are using version &d3.2.19"
  524. send " "
  525. send "&7Do &e/easyhomes help &7for a list of all commands."
  526. stop
  527. else:
  528. if {easyhomes.config::prefixonerror} is true:
  529. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  530. stop
  531. if {easyhomes.config::prefixonerror} is false:
  532. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  533. stop
  534.  
  535. on rightclick on sign:
  536. if {easyhomes.config::usesigns} is true:
  537. if line 1 of block is "§a[EasyHomes]":
  538. if line 2 of block is "§bTeleport":
  539. if player has permission "%{easyhomes.permissions::usesigns}%":
  540. loop {easyhomes.homes.%player's uuid%::*}:
  541. if line 3 of block is "§e%loop-value%":
  542. execute player command "home %loop-value%"
  543. set {_var} to true
  544. stop
  545. if {_var} is not set:
  546. if {easyhomes.config::prefixonerror} is true:
  547. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::homedoesntexist}%"
  548. stop
  549. if {easyhomes.config::prefixonerror} is false:
  550. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::homedoesntexist}%"
  551. stop
  552. else:
  553. if {easyhomes.config::prefixonerror} is true:
  554. send colored "%{easyhomes.config::prefix}% &c%{easyhomes.message::noperm}%"
  555. stop
  556. if {easyhomes.config::prefixonerror} is false:
  557. send colored "%{easyhomes.config::customerrorprefix}% &c%{easyhomes.message::noperm}%"
  558. stop
  559.  
  560. on sign change:
  561. if {easyhomes.config::usesigns} is true:
  562. if line 1 of event-block is "[EasyHomes]":
  563. if line 2 of event-block is "Home":
  564. if player has permission "%{easyhomes.permissions::placesigns}%":
  565. set {_var} to "§e%line 3 of event-block%"
  566. set line 1 of event-block to "§a[EasyHomes]"
  567. set line 2 of event-block to "§bTeleport"
  568. set line 3 of event-block to "%{_var}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement