Inactive [TP/MECH] TeleportSuite v1.1.2 - Teleport requests and more [1185]

Discussion in 'Inactive/Unsupported Plugins' started by krinsdeath, Aug 1, 2011.

  1. Offline

    krinsdeath

    TeleportSuite v1.1.2 - A fully featured teleport suite, including the ability to request teleports, list active requests, and teleport to a location or world.​
    Previous versions... 1.0.5 - 1.0.4 - 1.0.3 - 1.0.2 - 1.0.1 - 1.0.0
    [​IMG]
    Requirements
    • CraftBukkit 1185
    Optional (Recommended)
    • PermissionsBukkit (latest build)
    • bPermissions
    • PermissionsEx
    Basic usage: Drop the jar (here) into your plugins directory, and it'll do the rest! It will create a config.yml, which contains all of the messages the plugin sends to players. Each message is fully configurable to your taste.

    config.yml (open)

    Code:
    message:
        location: You are currently at (&b<x>&f, &b<y>&f, &b<z>&f) in &a<world>&f.
    error:
        arguments: '&CNot enough arguments.'
        no_location: '&CYou haven''t teleported yet.'
        target: '&CInvalid target.'
        invalid_world: '&CInvalid world'
        permission: '&CYou do not have permission for that.'
        params: '&CInvalid parameters.'
        destination: '&CInvalid destination.'
    request:
        open:
            entry: '&a<player>&f'
            none: You have no requests.
            self: 'Requesting teleport to: &a<player>&f'
            header: Open requests...
        ignored: '&a<player>&f is not allowing teleport requests.'
        only_one: You can only request one teleport at a time.
        deny: You denied &a<player>&f's teleport request.
        cancelled: '&a<player>&f cancelled their teleport request.'
        denied: '&a<player>&f denied your teleport request.'
        none: You have no request from &a<player>&f!
        cancel: You cancelled your teleport to &a<player>&f.
    teleport:
        message: Teleporting to &a<player>&f...
        toggle:
            message: Teleport requests will be <flag>.
            allowed: allowed
            default: false
            denied: ignored
        request:
            to: Awaiting response from &a<player>&f...
            from: Teleport request from &a<player>&f. (Accept with &a/tpaccept <player>&f)
        notice: '&a<player>&f is teleporting to you.'
    plugin:
        opfallback: false
        rebuild: false
        version: 1.1.0
    
    Permissions (open)

    • teleport.users - Grants access to /tpa, /tpahere, /tpaccept, /tpreject, and /tptoggle - Sets teleport.tpa, teleport.tpahere, teleport.accept, teleport.reject, teleport.toggle, teleport.cancel, teleport.back, teleport.requests, teleport.coords, teleport.world.* - Defaults to true
    • teleport.mods - Grants access to /tp and /tphere - Sets teleport.tp, teleport.tphere, teleport.tploc, teleport.tpworld
    • teleport.admins - Grants access to /tpo and /tpohere - Sets teleport.tpo, teleport.tpohere
    • teleport.* - Grants all-access - Sets teleport.users, teleport.mods, teleport.admins
    full permissions list (open)

    teleport.requests: Grants access to /requests, allows the user to view any active teleport requests that they have
    teleport.cancel: Grants access to /cancel, which cancels the sender's current teleport request
    teleport.toggle: Grants access to /tptoggle, allows the user to ignore teleport requests
    teleport.accept: Grants access to /tpaccept, allows the user to accept a teleport request from the target specified
    teleport.reject: Grants access to /tpreject, allows the user to reject a teleport request from the target specified
    teleport.back: Grants access to /back, teleports the user to their location prior to their last teleport, or the location at which they logged in
    teleport.tpa: Grants access to /tpa, allows the user to request a teleport to the specified target
    teleport.tpahere: Grants access to /tpahere, allows the user to request the target to teleport to them
    teleport.tp: Grants access to /tp, allows the user to teleport without confirmation from the target
    teleport.tphere: Grants access to /tphere, allows the user to teleport the target to them without confirmation
    teleport.tpo: Grants access to /tpo, allows the user to teleport to their target, regardless of the target's toggle state
    teleport.tpohere: Grants access to /tpohere, allows the user to teleport the player specified to them, regardless of the target's toggle state
    teleport.tploc: Grants access to /tploc, allows the user to teleport to the specified location
    teleport.coords: Grants access to /tpcoords, which shows the sender's current location
    teleport.tpworld: Grants access to /tpworld, which teleports the user to a specified world (to their last known location in that world).
    teleport.world.[worldname]: Allows the use of /tploc and /tpworld to the specified worldnames. (also accepts *, for all worlds)


    Commands: Flags marked with () are required.
    • /tprequests - Lists all of your current teleport requests, as well as any active request you have made.
    • /tpcancel - Cancels your currently active request.
    • /tptoggle - Sets your toggle status.
    • /tpa (player), /tpahere (player) - Requests a teleport to (/tpa) the specified player, or for the specified player to come to you (/tpahere). If /tptoggle is set to true, these requests will be ignored.
    • /tp (player), /tphere (player) - Teleports the sender to the target (/tp), or the target to the sender (/tphere), without confirmation. If /tptoggle is set to true, this command will be ignored.
    • /tpo (player), /tpohere (player) - Forces the target to teleport. Will override /tptoggle.
    • /tploc (x y z) [world] - Teleports the user to the specified location. Will fail if the block occupying the space where the player's head will be is not air. (note: you can teleport into the sky and fall to your death with this)
    • /tpworld (world) - Teleports the user to the specified world. Note: This command remembers that user's location in the world, and attempts to send them to their last known coordinates in that world. It only remembers positions if /tpworld is used to leave the world.
    • /back - Teleports the user to their location prior to their last teleport, or where they logged in (whichever location is newer).
    TeleportSuite is also available via BukGet
    To do:
    • Implement saving and loading, so requests are persisted across reloads and server restarts
    • You tell me! I want to keep the plugin rather lightweight, however, so non-teleport related feature requests will be ignored.
    Changelog
    Version 1.0.6 (Latest)
    • A bit of extra NPE protection
    • passing strings to methods rather than player instances
    • code cleanup
    Version 1.0.5
    • Fixed an NPE that was the result of players with active requests logging out or being kicked. Any player that logs out instantly drops all active requests and any requests they've made.
    Version 1.0.4
    • Made messages optional; setting any field to null, or deleting the key, will make the message not show
    • Added a default value to the toggle status, at 'teleport.toggle.default'. Standard configuration defaults it to "false" (allows teleport requests)
    • Each message is now multi-line capable by putting the field into a list of lines, if you wish.
    Version 1.0.3
    • Fixed /back not properly aligning pitch and yaw
    • Changed /cancel to /tpcancel, to fit with the motif
    • Added 'world' option to /tploc
    • Added /loc (with aliases /where and /whereami), shows the sender's current location
    • Fixed /tpo not correctly overriding user toggle switch in certain instances
    Version 1.0.2
    • Added version tracking method
    • Increased cleaning when plugin is disabled
    • Added javadocs for possible public API
    Version 1.0.1
    • Added /cancel.
    • /tpaccept and /tpreject will now automatically affect the first person in your request queue if passed with no parameters
    • Fixed erroneous permission check on /tploc
    • Added tracking to /tploc for /back
    Version 1.0.0
    • Initial release
     
  2. Offline

    Ravenedge

    Decent plugin, lightweight and easy to work with.
    Tested and working - as Krinsdeath says, the replies to players are fully adjustable.
     
  3. Offline

    codename_B

    I approve. What priority does it use for events?
     
  4. Offline

    krinsdeath

    Priority.Normal. I could have used Priority.Monitor, I think, but I just.. didn't.

    Why do you ask? (it only registers PLAYER_JOIN, PLAYER_KICK and PLAYER_QUIT)
     
  5. Offline

    Kohle

    Wonderful, krinsdeath!! I'm replaing the current TP plugin on my server with this one. ;)
     
  6. Offline

    codename_B

    IAPPROVE
     
  7. Offline

    krinsdeath

    Typically, I'm not an advocate of bumping topics, but here we go. I believe this is worthy of being moved to releases. :|
     
  8. Offline

    cholo71796

    @krinsdeath
    Even if it wasn't, I find it strange that a moderator hasn't even commented on this in five days.
     
  9. Offline

    ohtwo

    Wonderful plugin. Great job!
     
  10. Offline

    DJAddi

    Simple, straight, smart. Like this kind of plugins (although TeleportSuite is not that fitting as name for it ;)).
    Just to make sure I understood it: If /tptoggle is on, requests will be allowed, but not accepted automatically and if it is off, they will be blocked?!
    Anyway, could you add the default for the toggle to the config?
    Have fun,

    Addi
     
  11. Offline

    krinsdeath

    If a player uses /tptoggle, a message should be displayed to them which indicates whether requests will be allowed or rejected. As for the default, what do you mean? The message displayed to the users is already configurable (via 'teleport.toggle.message').

    Thanks for the feedback! I appreciate it. :D
     
  12. Offline

    Plague

    Sorry for the delay in submission approvals, I've been away for a while.
     
  13. Offline

    DJAddi

    Sure there is a message displayed, but I would appreciate a config node which allows to set the default for the toggle, e.g.
    Code:
    teleport:
        toggle:
            default: on/off
    Have fun,

    Addi
     
  14. Offline

    krinsdeath

    Ahh, alright. I've already bundled this into a small patch, but since I haven't done any other changes I'm reluctant to put out a quick fix just for this. As I find and fix any bugs associated with 1.0.3, I'll keep this in mind.

    It'll be in the next release!
     
  15. Offline

    DJAddi

    Alright, tyvm and continue good work.
    Have fun,

    Addi
     
  16. Offline

    saladfingers

    Would it possible to add a silent feature so admins can /vanish and /tp to someone without them knowing.

    If I take out the notice message in the config, players get 'not null'
     
  17. Offline

    krinsdeath

    Ahh, sorry about that. I was using that to make sure that values didn't throw NPEs. I'll add it to the fixes for the next release (1.0.4)!

    Thanks.
     
  18. Offline

    MrCamping

    Nice plugin! :)
    Would it be possible to make it compatible with Permissions 3.1.x too?

    thanks
     
  19. Offline

    DJAddi

    Hmm... the /tpcancel seems to be a bit buggy. When I use /tpa PLAYER, then cancel it, the requests is removed from the list (/requests), but when I try to start a new requests I get "You can only request one teleport at a time!" (same for /tpo after I cancelled /tpa).
    That can only be fixed by reloading the plugin or restarting the server...
    Have fun,

    Addi
     
  20. Offline

    krinsdeath

    @DJAddi - Sorry about that. It was a very minor oversight, and is now fixed. Redownload the jar from the static link above, and it'll be fixed. Thanks for your help with debugging this plugin!
     
  21. Offline

    DJAddi

    Everything working fine now, thanks.
     
  22. Offline

    Dharkk

    Currently using the latest version of PermissionsBukkit and Superpermsbridge and for some reason even when I have teleport.admin: true the admins that are not OP still can't use /tp. Not sure if its the permissions plugin/compatibility or not but I can't figure out why it's happening. They are getting the "You do not have permission to do that." response.

    Not too huge a deal, I just OPed all of the admins for now. Love the plugin btw :D

    -EDIT-

    Everyone could use the other commands that a normal user would use (/tpa and everything that goes with it), forgot to include that >.<.
     
  23. Offline

    krinsdeath

    The convenience node is "teleport.admins," you're missing the s. If I'm mistaken, however, could you post a pastebin of your config.yml for PermissionsBukkit? I can only guess as to what the problem is without seeing anything. :x
     
  24. Offline

    DJAddi

    Hi again!
    Found another important issue: If someone requests a teleport and the target player leaves, the source player can't cancel the request (NPE), stacktrace below.
    Show Spoiler
    Code:
    2011-08-13 17:20:15 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'tpcancel' in plugin TeleportSuite v1.0.4
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:338)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:727)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:691)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:684)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:87)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at net.krinsoft.teleportsuite.Localization.message(Localization.java:57)
        at net.krinsoft.teleportsuite.Commands.onCommand(Commands.java:233)
        at net.krinsoft.teleportsuite.TeleportSuite.onCommand(TeleportSuite.java:50)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
     
  25. Offline

    Dharkk

    Thanks for catching that lol, can't believe that I missed that heheh. Sometimes it's the littlest things >.<
     
  26. Offline

    krinsdeath

    @DJAddi - v1.0.5 is now live, you can get it via BukGet with pkg update TeleportSuite, or download it from the main post.

    @Dharkk - No problem! If you do find any problems, be sure to post them here or on my github issue tracker. Thanks!
     
  27. Offline

    DJAddi

    Seems like you "fixed" an NPE with a new NPE. This happens on player logout:
    Show Spoiler
    Code:
    2011-08-15 00:21:13 [SEVERE] Could not pass event PLAYER_QUIT to TeleportSuite
    java.lang.NullPointerException
        at net.krinsoft.teleportsuite.TeleportPlayer.removePlayer(TeleportPlayer.java:65)
        at net.krinsoft.teleportsuite.Players.onPlayerQuit(Players.java:24)
        at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:628)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  28. Offline

    krinsdeath

    @DJAddi - Rather ambiguous error message, the line it was reporting was impossible (it was actually reporting an error on the line before it).

    Anyway, it's now fixed. Redownload the jar from the static link above, or do pkg install [email protected] via BukGet.
     
  29. Offline

    DJAddi

    I know I keep annoying you - the npe was fixed for normal quits, but for kicks there is pretty much the same NPE that still occurs.
    Show Spoiler
    Code:
    2011-08-16 00:41:12 [SEVERE] Could not pass event PLAYER_QUIT to TeleportSuite
    java.lang.NullPointerException
        at net.krinsoft.teleportsuite.TeleportPlayer.removePlayer(TeleportPlayer.java:68)
        at net.krinsoft.teleportsuite.Players.onPlayerQuit(Players.java:23)
        at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:628)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)


    €: Just found another NPE - I don't know when this happens, just noticed it in the server log.
    Show Spoiler
    Code:
    2011-08-16 19:49:55 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'tpaccept' in plugin TeleportSuite v1.0.5
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at net.krinsoft.teleportsuite.TeleportPlayer.hasRequest(TeleportPlayer.java:390)
        at net.krinsoft.teleportsuite.TeleportPlayer.accept(TeleportPlayer.java:111)
        at net.krinsoft.teleportsuite.TeleportPlayer.acceptFirst(TeleportPlayer.java:154)
        at net.krinsoft.teleportsuite.Commands.onCommand(Commands.java:158)
        at net.krinsoft.teleportsuite.TeleportSuite.onCommand(TeleportSuite.java:49)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
     
  30. Offline

    Don Redhorse

    hi, would it be possible to add a /tpback which will get you back to the place you where before you did a /tp ?
     

Share This Page