[COMPLETED] Random TP.

Discussion in 'Plugin Requests' started by Reptar_, Jul 26, 2012.

  1. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Plugin Category: FUN/TP

    Suggested Name: RandomTP

    What I Want: I want a plugin where the player types a command and they teleport randomly to a preset teleport spot. But it has to work with Essentials. Some other plugin I used that does this always sends me back to main spawn and I also get other errors when I use some of the other commands.
    For example, I set 5 spots, I use the command and I go to one of those 5 spots randomly. I also need it to be multi-verse compatible. I don't want the player to receive any message at all when they teleport. The amount of spots I can make should be unlimited, please! :3

    Commands:
    /rtp set <name> - Sets a TP spot.
    /rtp del <name> - Deletes a TP spot.
    /rtp list - Shows a list of all TP names.
    /rtp - Randomly TPs you to a preset TP spot.

    Permissions:
    rtp.set - Allows to set TP spots.
    rtp.del - Allows to delete TP spots.
    rtp.list - Allows to list TP spots.
    rtp.rtp - Allows to use /rtp.

    When I'd Like It By: Maybe tonight or tomorrow afternoon, please

    Extra: If you have any questions or concerns, please leave a comment below. It seems like this plugin is fairly simple. Making the commands should take up most of the time.
  2. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'll take a look at this tomorrow, if that's ok. I will post my progress so far in this post.
    • Assuming Java version 6
    • Adding commands...
    • Adding permissions...
    • Adding console restrictions...
    • Adding delete command...
    • Adding list command (pretty simple currently)...
    • Adding set and warp functionality...
    • Testing...
    • Finished

    This post has been edited 5 times. It was last edited by lol768 Jul 27, 2012.
  3. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That's fine. Take your time! :)
  4. Offline

    kaZep

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  5. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @kaZep
    That requires an extra plugin that is way too much for what I need. I don't need borders, I just need spots.
  6. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've just finished randomTP, and compiled it under Java 6 for you. Download link: http://www.filedropper.com/rtp6

    I'm happy to change anything if you want me to.
  7. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Errors:
    Code:
    15:39:13 [SEVERE] Could not load 'plugins/rtp_6.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/lol768/rtp/main : Unsupported major.minor version 51.0
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:151)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:213)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:189)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:166)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.UnsupportedClassVersionError: me/lol768/rtp/main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140)
    ... 8 more
    
  8. Offline

    TheSmallBones

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Get the person who made this to export in java 7.
  9. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

    This post has been edited 2 times. It was last edited by lol768 Jul 29, 2012.
  10. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @lol768
    Thanks so much! Works great! :)
  11. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Crap, I totally messed up. Since I'm using this so they randomly tp into an arena, I forgot I have multiple arenas. Is there any way you can add categories for worlds? So like instead of /rtp set <name>, you also add the world name so it only tp's you to the points in that world? I'm so sorry! I totally forgot! Command is /rtp set <name> <world>.
  12. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sure, I can work on this on this tomorrow for you (too much time on computer = headache lol).

    Also, sorry about the delay, I didn't seem to see the alert.

    This post has been edited 1 time. It was last edited by lol768 Jul 29, 2012.
  13. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @lol768
    No problem, that's fine with me.
  14. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Reptar_ Done

    Changed commands:
    /rtp <cat> -- teleports to random point in specified category
    /rtp set <cat> <name> -- sets point in specified category
    /rtp del <cat> <name> -- deletes named warp in specified category
    /rtp list [cat] -- lists warp in a category/all categories
    /rtp list #cat -- lists all categories

    Download: http://www.filedropper.com/rtpactually6_1

    Tell me if there re any issues. Hope it works ok for you.

    This post has been edited 3 times. It was last edited by lol768 Jul 30, 2012.
  15. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @lol768
    When I use /rtp <cat> I get internal errors. Everything else works great!
    Code:
    14:12:28 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'rtp' in plugin randomTP v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:484)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:811)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:771)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:754)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:246)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:102)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:82)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:559)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:451)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NullPointerException
    at org.bukkit.craftbukkit.CraftServer.getWorld(CraftServer.java:773)
    at org.bukkit.Bukkit.getWorld(Bukkit.java:166)
    at me.lol768.rtp.main.onCommand(main.java:75)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    ... 12 more
    
    Could be the an argument mess-up maybe, from what I see.

    This post has been edited 1 time. It was last edited by Reptar_ Jul 30, 2012.
  16. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Oh dear. Can you post your config.yml file here please?

    Interesting, I'll take a look at that. My thought is that there is conflicting config nodes.

    This post has been edited 1 time. It was last edited by lol768 Jul 30, 2012.
  17. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I had to zip it, but here it is.
    http://www.filedropper.com/randomtp
  18. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Edit: Yes it does. I'm trying out your config file and attempting to fix the issue.

    This post has been edited 2 times. It was last edited by lol768 Jul 30, 2012.
  19. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Lemme check.
  20. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes it does.
  21. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  22. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  23. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    And I gotta say, works perfectly! Thanks a lot once again! You just made my server that much better! :)
  24. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I changed the config syntax to category.warp.x/y/z/world but then forgot to change it where it actually got the values

    No problem :)
  25. Offline

    Pippiter69

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey. This is a plugin I need. The download link isn't working.. Can you post it on mediafire?
  26. Offline

    Pippiter69

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  27. Offline

    Reptar_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

    This post has been edited 1 time. It was last edited by Reptar_ Aug 23, 2012.
  28. Offline

    Pippiter69

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can you get me one without permissions so I don't have to get a permissions plugin (Ops can do all commands while nonops can only do /rtp [cat])
  29. Offline

    lol768 BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'll see what I can do.
    Download: here

    This post has been edited 1 time. It was last edited by lol768 Aug 23, 2012.
  30. Offline

    Pippiter69

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    One more thing. Can you please make it so when you are 20 blocks away from spawn you can not do the command? (say so,etching like You are to far away from spawn)

Share This Page