Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /getteleporter:
- permission: teleporter.admin
- permission message: &cYou do not have permssion to use this command.
- trigger:
- give player eye of ender with nbt "{display:{Name:""&5&lTeleporter"",Lore:[""&7シフトと右クリックで座標の保存"",""&7右クリックで保存されている座標へテレポート"",""&7シフトと左クリックで保存されている座標のリセット"","""",""&7保存されている座標: なし""]},ench:[{id:0s,lvl:0s}],HideFlags:1}"
- on rightclick with eye of ender:
- name of player's tool is "&5&lTeleporter"
- cancel event
- if player is sneaking:
- 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%"
- send "&d座標: %player's world%, %x-coordinate of player%, %y-coordinate of player%, %z-coordinate of player%を保存しました"
- else if player is not sneaking:
- first 13 characters of line 5 of lore of player's tool is "&7保存されている座標: "
- 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
- if {_locstring} is "なし":
- send "&d座標が保存されていません"
- else:
- set {_locinfos::*} to split {_locstring} by ", "
- set {_x} to {_locinfos::2} parsed as number
- set {_y} to {_locinfos::3} parsed as number
- set {_z} to {_locinfos::4} parsed as number
- teleport player to location at {_x}, {_y}, {_z} in world "%{_locinfos::1}%"
- play sound "ENTITY_ENDERMEN_TELEPORT" to player with volume 1 and pitch 5
- send "&dあなたを座標: %{_locinfos::1}%, %{_x}%, %{_y}%, %{_z}%にテレポートしました" to player
- on rightclick:
- player's offhand tool is eye of ender
- name of player's offhand tool is "&5&lTeleporter"
- cancel event
- on leftclick with eye of ender:
- player is sneaking
- name of player's tool is "&5&lTeleporter"
- set line 5 of lore of player's tool to "&7保存されている座標: なし"
- send "&d保存されている座標をリセットしました"
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment