akon1248

Untitled

Feb 3rd, 2019
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. command /getteleporter:
  2. permission: teleporter.admin
  3. permission message: &cYou do not have permssion to use this command.
  4. trigger:
  5. give player eye of ender with nbt "{display:{Name:""&5&lTeleporter"",Lore:[""&7シフトと右クリックで座標の保存"",""&7右クリックで保存されている座標へテレポート"",""&7シフトと左クリックで保存されている座標のリセット"","""",""&7保存されている座標: なし""]},ench:[{id:0s,lvl:0s}],HideFlags:1}"
  6. on rightclick with eye of ender:
  7. name of player's tool is "&5&lTeleporter"
  8. cancel event
  9. if player is sneaking:
  10. set line 5 of lore of player's tool to "&7保存されている座標: %player's world%, %x-coordinate of player%, %y-coordinate of player%, %z-coordinate of player%"
  11. send "&d座標: %player's world%, %x-coordinate of player%, %y-coordinate of player%, %z-coordinate of player%を保存しました"
  12. else if player is not sneaking:
  13. first 13 characters of line 5 of lore of player's tool is "&7保存されている座標: "
  14. set {_locstring} to last length of line 5 of lore of player's tool-13 characters of line 5 of lore of player's tool
  15. if {_locstring} is "なし":
  16. send "&d座標が保存されていません"
  17. else:
  18. set {_locinfos::*} to split {_locstring} by ", "
  19. set {_x} to {_locinfos::2} parsed as number
  20. set {_y} to {_locinfos::3} parsed as number
  21. set {_z} to {_locinfos::4} parsed as number
  22. teleport player to location at {_x}, {_y}, {_z} in world "%{_locinfos::1}%"
  23. play sound "ENTITY_ENDERMEN_TELEPORT" to player with volume 1 and pitch 5
  24. send "&dあなたを座標: %{_locinfos::1}%, %{_x}%, %{_y}%, %{_z}%にテレポートしました" to player
  25. on rightclick:
  26. player's offhand tool is eye of ender
  27. name of player's offhand tool is "&5&lTeleporter"
  28. cancel event
  29. on leftclick with eye of ender:
  30. player is sneaking
  31. name of player's tool is "&5&lTeleporter"
  32. set line 5 of lore of player's tool to "&7保存されている座標: なし"
  33. send "&d保存されている座標をリセットしました"
  34. cancel event
Advertisement
Add Comment
Please, Sign In to add comment