Jump to content

DuckySoUnLucky

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by DuckySoUnLucky

  1.  
     

    Quote

    import:
        org.bukkit.Bukkit
    command /tpa [<text>]:
        permission: essentials.tpa
        aliases: /pcall, ptpask
        trigger:
            if length of arg-1 < 16:
                if arg-1 parsed as player is online:
                    set {_arg1} to arg-1 parsed as player
                    set {_tptoggle} to value of placeholder "essentials_is_teleport_enabled" from {_arg1}
                    set {_Essentials} to Bukkit.getServer().getPluginManager().getPlugin("Essentials")
                    set {_uuid} to uuid of player
                    set {_alreadysent} to {_Essentials}.getUser({_arg1}).getTeleportRequest()
                    if {_arg1} is player:
                        send "&cYou cannot teleport to yourself." to player
                    else if {_tptoggle} is "no":
                        send "&c%arg-1% has teleportation disabled." to player
                    else if "%{_alreadysent}%" = "%{_uuid}%":
                        send "&cYou have already sent a teleport request to &7%{_arg1}%&c."
                    else:
                        execute player command "/neverusethiscommand %arg-1%"
                        send "&b%player% &9requests to teleport to you. &a<ttp:&9Click to &aaccept &9most recent teleport request.><cmd:/tpaccept>[Accept]<reset> &c<ttp:&9Click to &cdeny &9most recent teleport request.><cmd:/tpdeny>[Deny]<reset>" to {_arg1}
                else:
                    send "&cPlayer not found." to player
            else if arg-1 is not set:
                send "&7Usage: /tpa <player>" to player
            else:
                send "&cPlayer not found." to player
    command /tpahere [<text>]:
        permission: essentials.tpahere
        aliases: /askhere, teleporthere
        trigger:
            if length of arg-1 < 16:
                if arg-1 parsed as player is online:
                    set {_arg1h} to arg-1 parsed as player
                    set {_tptoggleh} to value of placeholder "essentials_is_teleport_enabled" from {_arg1h}
                    set {_Essentials} to Bukkit.getServer().getPluginManager().getPlugin("Essentials")
                    set {_uuidh} to uuid of player
                    set {_alreadysenth} to {_Essentials}.getUser({_arg1h}).getTeleportRequest()
                    if {_arg1h} is player:
                        send "&cYou cannot teleport to yourself." to player
                    else if {_tptoggleh} is "no":
                        send "&c%arg-1% has teleportation disabled." to player
                    else if "%{_alreadysenth}%" = "%{_uuidh}%":
                        send "&cYou have already sent a teleport request to &7%{_arg1h}%&c."
                    else:
                        execute player command "/neverusethiscommand2 %arg-1%"
                        send "&b%player% &9requests you teleport to them. &a<ttp:&9Click to &aaccept &9most recent teleport request.><cmd:/tpaccept>[Accept]<reset> &c<ttp:&9Click to &cdeny &9most recent teleport request.><cmd:/tpdeny>[Deny]<reset>" to {_arg1h}
                else:
                    send "&cPlayer not found." to player
            else if arg-1 is not set:
                send "&7Usage: /tpahere <player>" to player
            else:
                send "&cPlayer not found." to player

    Didnt Test It Just Made It :/
    If there are any errors just tell

×
×
  • Create New...