Advertisement
Guest User

mychunk

a guest
May 26th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.65 KB | None | 0 0
  1. options:
  2.  
  3. #MESSAGES
  4.  
  5. Message when chunk isn't yours: &cTen chunk nie jest twój!
  6. Chunk is already claimed: &cTen chunk jest już zajęty!
  7. PVP is disabled: &cPVP jest wyłączyone w tym chunku!
  8. PVE is disabled: &cNie możesz zabijać mobów na tym chunku!
  9. Interact is disabled: &cInterakcja na tym chunku została wyłączona!
  10. Chunk limit reached: &cOsiągnołeś maksimum chunków!
  11. Chunk claimed: &aZajołeś ten chunk (polecam F3 + G aby zobaczyć do kąd jest chunk)
  12. Chunk claimed for another player: &aChunk zajęty przez gracza %arg 2%
  13. Chunk unclaimed: &aChunk sprzedany
  14. All chunks unclaimed: &aWłaśnie szrzedałeś %{_number}% chunków!
  15. Not a claimed chunk: &cTen chunk nie jest zajęty!
  16. Player already enabled: &cjuż dodałeś tego gracza do twojego chunku!
  17. Player already disabled: &cjuż usunąłeś tego gracza ze swojego chunku!
  18. Not enough money: &cNie masz wystarczająco pikseli aby zjąć chunk polecam kupić piksele na chlewik.tk.
  19. Money paid for the chunk: &aZapłaciłeś %{chunckprice.%player%}% aby kupić ten chunk.
  20. PVP is disabled in unclaimed chunks: &cPVP jest wyłączone na chunkach nie zclaimowanych.
  21. Ender portals are disabled: &cEnder portale zostały wyłączone na tym świecie.
  22. Nether portals are disabled: &cNether portale zostały wyłączone na tym świecie.
  23. General infomations: Podstawowe informacje
  24. Price of next chunk: Koszt następnego chunku
  25. Owned chunks: Zajęte chunki
  26. That chunk: Ten chunk
  27. Owner: Właściciel
  28. Allowed players: Dodani gracze
  29. Chunk is empty, there's no informations to show: Chunk jest pusty nie mogę podać informacji
  30.  
  31. #OTHER OPTIONS:
  32.  
  33. #Permissions options:
  34. Bypass permission: chunk.admin
  35. /chunk claim permission: chunk.claim
  36. /chunk pvp on/off permission: chunk.pvp
  37. /chunk pve on/off permission: chunk.pve
  38. /chunk interact on/off permission: chunk.interact
  39. /chunk unclaim permission: chunk.unclaim
  40. /chunk unclaim all permission: chunk.unclaim
  41. /chunk information permission: chunk.info
  42. /chunk add/remove <player> permission: chunk.manage.members
  43. /chunk help permission: chunk.help
  44.  
  45. Chunk limit: 12312312312312
  46.  
  47.  
  48. #Economy options:
  49. Use economy: true
  50. Chunk price: 250.0
  51. Ramp price: 0 #value added to the price after each
  52. #chunk bought. set it to 0 to disable it
  53. First chunk free: true
  54. Refund on unclaim: true
  55. Refund percent: 75
  56.  
  57.  
  58. #Protection options:
  59. Protect unclaimed chunks: false
  60. PVP in unclaimed chunks: true
  61. PVP disabled by default in claimed chunks: true
  62. Interactions disabled by default in claimed chunks: true
  63. PVE disabled by default in claimed chunks: true
  64.  
  65. #World otpions:
  66. Enable MychunkSkript only in a few worlds: true
  67. Worlds where the plugin is enabled: Island2.
  68. #You can separate world name as you want, like this: auria-erlend or this:
  69. #auria,erlend. The plugins only check if the world where you are is in the
  70. #world list.You can also do like that: auriaerlend XD
  71. Allow nether in MychunkSkript worlds: true
  72. Allow end in MychunkSkript worlds: true
  73.  
  74.  
  75. #CODE
  76. on portal:
  77. {@Enable MychunkSkript only in a few worlds} is true:
  78. "{@Worlds where the plugin is enabled}" does not contain "%player's world%"
  79. stop
  80. if block at player is end portal:
  81. {@Allow end in MychunkSkript worlds} is false
  82. set {_lastloc.%player%} to location of player
  83. wait 3 second
  84. add 1 to y coordinates of {_lastloc.%player%}
  85. teleport player to {_lastloc.%player%}
  86. push player 3 meters to the right
  87. message "{@Ender portals are disabled}"
  88. if block at player is nether portal:
  89. {@Allow nether in MychunkSkript worlds} is false
  90. cancel event
  91. message "{@Nether portals are disabled}"
  92.  
  93.  
  94. #MAIN COMMAND
  95. command /chunk [<text>] [<text>] [<player>]:
  96. trigger:
  97. {@Enable MychunkSkript only in a few worlds} is true:
  98. "{@Worlds where the plugin is enabled}" does not contain "%player's world%"
  99. stop
  100. arg 1 is not set:
  101. player has permission "{@/chunk help permission}"
  102. message "&cProszę, użyj jednej z tych komend:"
  103. message "&a ( ) = opcjonalny argument"
  104. message "&a < > = argument wymagany"
  105. message "&b/chunk claim &6(player)"
  106. message "&b/chunk unclaim &6(all)"
  107. message "&b/chunk add &6<player>"
  108. message "&b/chunk remove &6<player>"
  109. message "&b/chunk info"
  110. message "&b/chunk pvp &6(on/off)"
  111. message "&b/chunk pve &6(on/off)"
  112. message "&b/chunk interact &6(on/off)"
  113. arg 1 is "help":
  114. player has permission "{@/chunk help permission}"
  115. message "&cProszę, użyj jednej z tych komend:"
  116. message "&a ( ) = opcjonalny argument"
  117. message "&a < > = argument wymagany"
  118. message "&b/chunk claim &6(player)"
  119. message "&b/chunk unclaim &6(all)"
  120. message "&b/chunk add &6<player>"
  121. message "&b/chunk remove &6<player>"
  122. message "&b/chunk info"
  123. message "&b/chunk pvp &6(on/off)"
  124. message "&b/chunk pve &6(on/off)"
  125. message "&b/chunk interact &6(on/off)"
  126. arg 1 is "info":
  127. player has permission "{@/chunk information permission}"
  128. set {_pve} to "Aktywne"
  129. set {_pvp} to "Aktywne"
  130. set {_interact} to "Aktywne"
  131. loop {nointeract chunk::*}:
  132. loop-value is chunk at player:
  133. set {_interact} to "Nie aktywne"
  134. loop {nopve chunks::*}:
  135. loop-value is chunk at player:
  136. set {_pve} to "Nie aktywne"
  137. loop {nopvp chunks::*}:
  138. loop-value is chunk at player:
  139. set {_pvp} to "Nie aktywne"
  140. message "&6&l{@General infomations}:"
  141. {@Use economy} is true:
  142. {free.%player%} is not set:
  143. set {_price} to {@Chunk price}
  144. {free.%player%} is set:
  145. {chunckprice.%player%} is greater or equal to {@Chunk price}:
  146. set {_price} to {chunckprice.%player%} + {@Ramp price}
  147. {chunckprice.%player%} is less than {@Chunk price}:
  148. set {_price} to {@Chunk price}
  149. {@First chunk free} is true:
  150. {free.%player%} is not set
  151. set {_price} to 0
  152. message "&b{@Price of next chunk}: &6%{_price}%"
  153. set {_number} to 0
  154. loop {protected chunks %player%::*}:
  155. add 1 to {_number}
  156. message "&b{@Owned chunks}: &6%{_number}%"
  157. message "&6&l{@That chunk}:"
  158. message "&b%chunk at player%"
  159. loop {protected chunks::*}:
  160. loop-value is chunk at player
  161. message "&b{@Owner}: &6%{chunk.%chunk at player%::owner}%" to sender
  162. message "&b{@Allowed players}: &6%{chunk.%chunk at player%::*}%"
  163. message "&bPVP: &6%{_pvp}%"
  164. message "&bPVE: &6%{_pve}%"
  165. message "&bInteractions: &6%{_interact}%"
  166. stop
  167. message "&a{@Chunk is empty, there's no informations to show}"
  168.  
  169.  
  170. arg 1 is "unclaim":
  171. arg 2 is not set:
  172. player has permission "{@/chunk unclaim permission}"
  173. loop {protected chunks %player%::*}:
  174. loop-value is chunk at player:
  175. remove chunk at player from {protected chunks::*}
  176. remove chunk at player from {protected chunks %player%::*}
  177. remove chunk at player from {nointeract chunk::*}
  178. remove player from {chunk.%chunk at player%::owner}
  179. clear {chunk.%chunk at player%::*}
  180. {@Use economy} is true:
  181. {@Refund on unclaim} is true:
  182. set {_refund} to {@Refund percent}*0.01*{chunckprice.%player%}
  183. add {_refund} to player's money
  184. set {chunckprice.%player%} to {chunckprice.%player%}-{@Ramp price}
  185. loop {protected chunks::*}:
  186. loop-value is chunk at player:
  187. message "{@Message when chunk isn't yours}"
  188. stop
  189. message "{@Not a claimed chunk}"
  190. arg 2 is "all":
  191. player has permission "{@/chunk unclaim all permission}"
  192. set {_number} to 0
  193. loop {protected chunks %player%::*}:
  194. remove loop-value from {protected chunks::*}
  195. remove loop-value from {protected chunks %player%::*}
  196. remove chunk at player from {nointeract chunk::*}
  197. remove player from {chunk.%loop-value%::owner}
  198. clear {chunk.%loop-value%::*}
  199. {@Use economy} is true:
  200. {@Refund on unclaim} is true:
  201. set {_refund} to {@Refund percent}*0.01*{chunckprice.%player%}
  202. add {_refund} to player's money
  203. set {chunckprice.%player%} to {chunckprice.%player%}-{@Ramp price}
  204. add 1 to {_number}
  205. set {chunckprice.%player%} to {@Chunk price}
  206. message "{@All chunks unclaimed}"
  207.  
  208.  
  209. arg 1 is "claim":
  210. player has permission "{@/chunk claim permission}"
  211. loop {protected chunks::*}:
  212. loop-value is chunk at player
  213. message "{@Chunk is already claimed}"
  214. stop
  215. arg 2 is not set:
  216. {chunks.%player%} is not set:
  217. set {chunks.%player%} to 0
  218. add 1 to {chunks.%player%}
  219. {chunks.%player%} is greater than {@Chunk limit}:
  220. player does not have permission "{@Bypass permission}":
  221. message "{@Chunk limit reached}"
  222. stop
  223. {@Use economy} is true:
  224. {free.%player%} is not set:
  225. set {chunckprice.%player%} to {@Chunk price}
  226. {free.%player%} is set:
  227. {chunckprice.%player%} is greater or equal to {@Chunk price}:
  228. set {chunckprice.%player%} to {chunckprice.%player%} + {@Ramp price}
  229. {chunckprice.%player%} is less than {@Chunk price}:
  230. set {chunckprice.%player%} to {@Chunk price}
  231. {@First chunk free} is true:
  232. {free.%player%} is not set
  233. set {chunckprice.%player%} to 0
  234. set {free.%player%} to 1
  235. player's money is greater or equal to {chunckprice.%player%}:
  236. remove {chunckprice.%player%} from player's money
  237. player's money is less than {chunckprice.%player%}:
  238. message "{@Not enough money}"
  239. stop
  240. message "{@Money paid for the chunk}"
  241. message "{@Chunk claimed}"
  242. {@Interactions disabled by default in claimed chunks} is true:
  243. add chunk at player to {nointeract chunk::*}
  244. {@PVP disabled by default in claimed chunks} is true:
  245. add chunk at player to {nopvp chunks::*}
  246. {@PVE disabled by default in claimed chunks} is true:
  247. add chunk at player to {nopve chunks::*}
  248. set {chunk.%chunk at player%::owner} to "%player%"
  249. add chunk at player to {protected chunks::*}
  250. add chunk at player to {protected chunks %player%::*}
  251. add chunk at player to {nointeract chunk::*}
  252. arg 2 is set:
  253. player has permission "{@Bypass permission}"
  254. {chunks.%arg 2%} is not set:
  255. set {chunks.%arg 2%} to 0
  256. add 1 to {chunks.%arg 2%}
  257. message "{@Chunk claimed for another player}"
  258. {@Interactions disabled by default in claimed chunks} is true:
  259. add chunk at player to {nointeract chunk::*}
  260. {@PVP disabled by default in claimed chunks} is true:
  261. add chunk at player to {nopvp chunks::*}
  262. {@PVE disabled by default in claimed chunks} is true:
  263. add chunk at player to {nopve chunks::*}
  264. set {chunk.%chunk at player%::owner} to "%arg 2%"
  265. add chunk at player to {protected chunks::*}
  266. add chunk at player to {protected chunks %arg 2%::*}
  267.  
  268.  
  269. arg 1 is "add" or "remove":
  270. player has permission "{@/chunk add/remove <player> permission}"
  271. arg 2 is set
  272. loop {protected chunks %player%::*}:
  273. loop-value is chunk at player:
  274. set {_protec.%player%} to 1
  275. {_protec.%player%} is 1:
  276. "%{chunk.%chunk at player%::*}%" contains "%arg 2%":
  277. arg 1 is "add":
  278. message "{@Player already enabled}"
  279. stop
  280. "%{chunk.%chunk at player%::*}%" does not contain "%arg 2%":
  281. arg 1 is "remove":
  282. message "{@Player already disabled}"
  283. stop
  284. arg 1 is "add":
  285. message "&a%sender% has added you to their property!" to arg 2 parsed as player
  286. message "&aYou have added %arg 2% to your property!" to sender
  287. add arg 2 to {chunk.%chunk at player%::*}
  288. stop
  289. arg 1 is "remove":
  290. message "&c%sender% has removed you from their property!" to arg 2 parsed as player
  291. message "&aYou have removed %arg 2% from your property!" to sender
  292. remove arg 2 from {chunk.%chunk at player%::*}
  293. stop
  294. player has permission "{@Bypass permission}":
  295. arg 1 is "add":
  296. message "&a%sender% has added you to a property!" to arg 2 parsed as player
  297. message "&aYou have added %arg 2% to a property!" to sender
  298. add arg 2 to {chunk.%chunk at player%::*}
  299. stop
  300. arg 1 is "remove":
  301. message "&c%sender% has removed you from their property!" to arg 2 parsed as player
  302. message "&aYou have removed %arg 2% from your property!" to sender
  303. remove arg 2 from {chunk.%chunk at player%::*}
  304. stop
  305. message "{@Message when chunk isn't yours}"
  306.  
  307.  
  308. arg 1 is "pvp":
  309. player has permission "{@/chunk pvp on/off permission}"
  310. loop {protected chunks %player%::*}:
  311. loop-value is chunk at player:
  312. set {_protec.%player%} to 1
  313. player has permission "{@Bypass permission}":
  314. set {_protec.%player%} to 1
  315. {_protec.%player%} is not 1:
  316. message "{@Message when chunk isn't yours}"
  317. {_protec.%player%} is 1
  318. arg 1 is not set:
  319. loop {nopvp chunks::*}:
  320. loop-value is chunk at player:
  321. remove chunk at player from {nopvp chunks::*}
  322. message "&aPuting on PVP"
  323. stop
  324. add chunk at player to {nopvp chunks::*}
  325. message "&aPuting off PVP"
  326. arg 2 is "off":
  327. add chunk at player to {nopvp chunks::*}
  328. message "&aPuting off PVP"
  329. arg 2 is "on":
  330. remove chunk at player from {nopvp chunks::*}
  331. message "&aPuting on PVP"
  332.  
  333.  
  334. arg 1 is "pve":
  335. player has permission "{@/chunk pve on/off permission}"
  336. loop {protected chunks %player%::*}:
  337. loop-value is chunk at player:
  338. set {_protec.%player%} to 1
  339. player has permission "{@Bypass permission}":
  340. set {_protec.%player%} to 1
  341. {_protec.%player%} is not 1:
  342. message "{@Message when chunk isn't yours}"
  343. {_protec.%player%} is 1
  344. arg 1 is not set:
  345. loop {nopve chunks::*}:
  346. loop-value is chunk at player:
  347. remove chunk at player from {nopve chunks::*}
  348. message "&aPuting on PVE"
  349. stop
  350. add chunk at player to {nopve chunks::*}
  351. message "&aPuting off PVE"
  352. stop
  353. arg 2 is "off":
  354. add chunk at player to {nopve chunks::*}
  355. message "&aPuting off PVE"
  356. stop
  357. arg 2 is "on":
  358. remove chunk at player from {nopve chunks::*}
  359. message "&aPuting on PVE"
  360. stop
  361.  
  362.  
  363. arg 1 is "interact":
  364. player has permission "{@/chunk interact on/off permission}"
  365. loop {protected chunks %player%::*}:
  366. loop-value is chunk at player:
  367. set {_protec.%player%} to 1
  368. player has permission "{@Bypass permission}":
  369. set {_protec.%player%} to 1
  370. {_protec.%player%} is not 1:
  371. message "{@Message when chunk isn't yours}"
  372. {_protec.%player%} is 1
  373. arg 1 is not set:
  374. loop {nointeract chunk::*}:
  375. loop-value is chunk at player:
  376. remove chunk at player from {nointeract chunk::*}
  377. stop
  378. add chunk at player to {nointeract chunk::*}
  379. arg 2 is "off":
  380. message "&aPutting off interactions"
  381. add chunk at player to {nointeract chunk::*}
  382. arg 2 is "on":
  383. message "&aPutting on interactions"
  384. remove chunk at player from {nointeract chunk::*}
  385.  
  386.  
  387.  
  388. #CHUNK PROTECTION
  389.  
  390. on break:
  391. {@Enable MychunkSkript only in a few worlds} is true:
  392. "{@Worlds where the plugin is enabled}" does not contain "%player's world%"
  393. stop
  394. {@Protect unclaimed chunks} is true:
  395. set {_protec.%player%} to 1
  396. loop {protected chunks::*}:
  397. loop-value is chunk at player:
  398. set {_protec.%player%} to 1
  399. {_protec.%player%} is 1
  400. loop {protected chunks %player%::*}:
  401. loop-value is chunk at player:
  402. stop
  403. loop {chunk.%chunk at player%::*}:
  404. loop-value is player
  405. stop
  406. player has permission "{@Bypass permission}":
  407. stop
  408. message "{@Message when chunk isn't yours}"
  409. cancel event
  410. on place:
  411. {@Enable MychunkSkript only in a few worlds} is true:
  412. "{@Worlds where the plugin is enabled}" does not contain "%player's world%"
  413. stop
  414. {@Protect unclaimed chunks} is true:
  415. set {_protec.%player%} to 1
  416. loop {protected chunks::*}:
  417. loop-value is chunk at player:
  418. set {_protec.%player%} to 1
  419. {_protec.%player%} is 1
  420. loop {protected chunks %player%::*}:
  421. loop-value is chunk at player:
  422. stop
  423. loop {chunk.%chunk at player%::*}:
  424. loop-value is player
  425. stop
  426. player has permission "{@Bypass permission}":
  427. stop
  428. message "{@Message when chunk isn't yours}"
  429. cancel event
  430. on damage of an entity:
  431. {@Enable MychunkSkript only in a few worlds} is true:
  432. "{@Worlds where the plugin is enabled}" does not contain "%attacker's world%"
  433. stop
  434. attacker is a player:
  435. victim is not a player:
  436. loop {nopve chunks::*}:
  437. loop-value is chunk at attacker:
  438. message "{@PVE is disabled}" to attacker
  439. cancel event
  440. victim is a player:
  441. loop {nopvp chunks::*}:
  442. loop-value is chunk at attacker:
  443. attacker has permission "{@Bypass permission}":
  444. stop
  445. cancel event
  446. message "{@PVP is disabled}" to attacker
  447. {@PVP in unclaimed chunks} is false:
  448. loop {protected chunks::*}:
  449. loop-value is chunk at attacker:
  450. set {_protec.%attacker%} to 1
  451. {_protec.%attacker%} is not set:
  452. cancel event
  453. message "{@PVP is disabled in unclaimed chunks}"
  454. attacker is not a player:
  455. victim is a player:
  456. loop {nopve chunks::*}:
  457. loop-value is chunk at attacker:
  458. message "{@PVE is disabled}" to attacker
  459. cancel event
  460.  
  461.  
  462. on rightclick:
  463. {@Enable MychunkSkript only in a few worlds} is true:
  464. "{@Worlds where the plugin is enabled}" does not contain "%player's world%"
  465. stop
  466. player has permission "{@Bypass permission}":
  467. stop
  468. loop {protected chunks::*}:
  469. loop-value is chunk at player:
  470. set {_protec.%player%} to 1
  471. {@Protect unclaimed chunks} is true:
  472. {_protec.%player%} is not set
  473. cancel event
  474. {_protec.%player%} is 1
  475. loop {protected chunks %player%::*}:
  476. loop-value is chunk at player:
  477. stop
  478. loop {chunk.%chunk at player%::*}:
  479. loop-value is player
  480. stop
  481. loop {nointeract chunk::*}:
  482. loop-value is chunk at player:
  483. message "{@Interact is disabled}"
  484. cancel event
  485. #notify
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement