Filled ClickTP - very simple version (no commands needed)

Discussion in 'Plugin Requests' started by tspierer2, Nov 13, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    tspierer2

    Plugin name: ClickTP
    Version: 1.12.2 +
    Plugin Category: Teleportation
    Summary: This is a temporary plugin solution in regards to my other teleport plugin request.
    This will not change anything in the EssentialsX tp system or any commands at all.
    It has one function.
    It will replace the teleport request from this:
    [​IMG]

    to this:
    [​IMG]

    Once you click [accept] or [deny] it will simply run the commands in chat /tpaccept %player% or /tpdeny %player%.

    If possible, a config where you can edit the messages in chat, including the hover description when u hover over the clickable commands in chat.

    Thats all! Thank you so much for all the devs out here that are putting in a lot of effort and time into making plugins for free! You are all incredible.

    Let me know in comments if you have further questions.
    when I need it by: less than a month hopefully


    Edit: I also forgot /tpahere.
    It should go as follows:
    %player% has requested you teleport to them. [Accept] [Deny]


    Edit #2: to make it even easier, it doesn't need to replace the message. They can just be removed via messages_en language config. So the text just needs to run corresponding to the essentials tpa and tpahere system
     
    Last edited: Nov 13, 2018
  2. Offline

    jklmao

    I'm already doing this plugin for you. Why make another thread?
     
    Last edited: Nov 13, 2018
  3. Offline

    tspierer2

    This is temporary, the one you are making is very complicated to make and requires a lot commands and messages, etc.
     
  4. Offline

    0-o

  5. Offline

    tspierer2

    note to everyone who is going to use the plugin, go to essentials folder -> messages_en.properties and edit these to blank:
    teleportHereRequest=
    teleportRequest=
    teleportRequestTimeoutInfo=
    typeTpaccept=
    typeTpdeny=

    one more thing, can you make it so that when you /tpa (yourself) or /tpahere (yourself) it doesnt let you? right now if u tpa urself it gives u the message. Thanks!

    Also, when the clickable things go to new line they should take the whole word, it just makes it part white for ppl with long usernames it cuts it off so it doesn't work with 2nd line
     
    Last edited: Nov 15, 2018
  6. Offline

    tspierer2

    Issue solved, I had to make this plugin on my own using skript, if anyone wants this follow the instructions:
    requirements: skript, Ersatz skript addon, essentialsX, placeholderAPI, skript mirror addon
    1. delete these from essentialsX messages_en.properties config:
    teleportHereRequest=
    teleportRequest=
    teleportRequestTimeoutInfo=
    typeTpaccept=
    typeTpdeny=

    2. change /tpa and /tpahere aliases to neverusethiscommand and neverusethiscommand2 inside the essentials jar in plugin.yml

    3. use my skript
    Code:
    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
    
    (note this is poorly written skript because I never coded in my life

    enjoy to whoever uses this, please let me know so I can feel proud of myself

    EDIT: updated skript to better version, nov. 19
     
    Last edited: Nov 19, 2018
Thread Status:
Not open for further replies.

Share This Page