Player Warps

Discussion in 'Archived: Plugin Requests' started by _KoGuT_, May 26, 2014.

  1. Offline

    _KoGuT_

    Plugin category: Don't know

    Suggested name: Player Warps

    What I want: i want it so when someone does /setwarp it will automatically add there name to the warp name so lets say i do /setwarp the warp name would be (myIGN) so if notch sets a warp with /setwarp the warp would be called Notch so when a player does /setwarp it will set a warp WITH essentials and the name of the warp is there name so then there are admins… when someone with a permission node of playerwarp.admin then they can do /setwarp test and the warp name will be test but thats only if the person has that perm playerwarp.admin but normal players with playerwarp.set that will allow them to set the warp. if some random person does /setwarp test and they do not have the perm playerwarp.admin the warp name would still be there IGN so i want this to be linked with essentials warps. can you make it generate a configuration file that stored the warps and the x,y,z locations and can it store UUID's to prevent the name changing thing. so default essential warp system just when you /setwarp it makes it with your IGN. if you can't link it with essentials its TOTALY fine but just make it like that and make it so it over powers the essential command so /warp will go with this plugin not essentials. so then you will need to make a warp list and add more cmds and stuff if you can't link it

    Ideas for commands: No commands needed for this plugin i think.

    Ideas for permissions: playerwarp.use (allows the player to set a warp with there IGN)
    playerwarp.admin (can set a warp with any name)

    i hope you understand what I'm trying to say and i want this to link with the plugin essentials warping system.
    When I'd like it by: ASAP
     
  2. Offline

    _KoGuT_

  3. Offline

    _KoGuT_

  4. Offline

    _KoGuT_

  5. Offline

    _KoGuT_

  6. Offline

    XgXXSnipz

    HA wow ok I hope this post gets locked you bumped like crazy just calm down I hope no one makes this for you its a horrible idea because what if the player changes his name when the update comes out(this is coming soon, the name changing of course) to make this post better you should've asked to generate a configuration file that stored the warps and the x,y,z locations and you should've asked for it to store UUID's to prevent the name changing thing... so yea fix this post and maybe someone will make this
     
  7. Offline

    timtower Administrator Administrator Moderator

  8. Offline

    XgXXSnipz

    never said he did
     
  9. Offline

    timtower Administrator Administrator Moderator

    Bumping every day isn't a reason to lock anyways.
     
  10. Offline

    MrEminent42

    Yeah you should just allow your players to make warps themselves. You might want to out a sign saying that you can set a warp by doing /setwarp <playername>
     
  11. Offline

    XgXXSnipz

    But to me it is considered spam
     
  12. Offline

    timtower Administrator Administrator Moderator

    You can report it and see what the moderators do. As long as it isn't within 24 hours then it is allowed
     
    _KoGuT_ likes this.
  13. Offline

    Necrodoom

    If you believe a user is breaking the rules, report it, dont throw insults at the user or drive the thread offtopic.
     
    _KoGuT_ likes this.
  14. Offline

    Alster551

    XgXXSnipz you seem like the one who needs to calm down...
     
  15. Offline

    XgXXSnipz

    Forget it, idc
     
  16. Offline

    _KoGuT_

    thank you i updated the post to make it say generate a configuration file that stored the warps and the x,y,z locations and to make it store UUID's to prevent the name changing thing
     
  17. Offline

    _KoGuT_

  18. Offline

    _KoGuT_

  19. Offline

    dsouzamatt

    I've coded this plugin for you. You can download it from here:
    https://www.dropbox.com/s/fisoacrip67725h/PlayerWarps.jar
    Just place the .jar file in your plugins folder and reload your server.

    I haven't hooked into Essentials; this plugin does't really need it for what you're asking of it. The commands are:
    • /warpset for a player to set a warp with their name, or /warpset <name> to create a warp with a different name
    • /warpto to give a list of available warps, or /warpto <name> to warp to a location
    • /warpdelete for a player to delete a warp with their name, or /warpdelete <name> to delete a warp with a different name
    There are three permissions:
    • playerwarps.warp allows a player to use /warpto and /warpto <name>
    • playerwarps.use allows a player to use /warpset and /warpdelete
    • playerwarps.admin allows a player to use /warpset and /warpdelete , as well as /warpset <name> and /warpdelete <name>
    I hope that these instructions are clear enough to follow. If you have any trouble, please feel free to ask me for help.
     
  20. Offline

    dsouzamatt

    _KoGuT_ Have you tried out the plugin?
     
  21. Offline

    _KoGuT_

    dsouzamatt i didn't see it il try it out now!

    dsouzamatt the plugin works fine! BUT can you make it so the player warps are displayed like normal chat left to right not like in a list up and down so like this would be the list:
    name1, name2, name3, name4, name5, name6 etc
    once there are more then about 20 warps make it so there is a new page so then you will need to do /warpto2 to see page to /warpto3 to see page three

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  22. Offline

    dsouzamatt

  23. Offline

    mactown21

  24. Offline

    dsouzamatt

    mactown21 What version of craftbukkit is your plugin for? I got this error when trying to load it on my 1.6.4 test server:
    Code:
    15:07:41 [SEVERE] Could not load 'plugins/playerwarp.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/legitsoulja/playerwarp/playerwarp : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugins(CraftServer.java:241)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.reload(CraftServer.java:613)
        at org.bukkit.Bukkit.reload(Bukkit.java:277)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchCommand(CraftServer.java:528)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchServerCommand(CraftServer.java:515)
        at net.minecraft.server.v1_6_R3.DedicatedServer.as(DedicatedServer.java:263)
        at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:228)
        at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
        at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
        at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    Caused by: java.lang.UnsupportedClassVersionError: me/legitsoulja/playerwarp/playerwarp : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        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.findClass0(PluginClassLoader.java:80)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
        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:249)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
        ... 14 more
    And @_KoGuT_ I've been unable to work out how to show the list of warps over multiple pages. If anyone has suggestions as to how to do this, please let me know. Here's the current piece of code that lists the warps:
    Code:java
    1. List<String> strings = this.getConfig().getStringList("LocationsList");
    2. if(strings != null)
    3. {
    4. player.sendMessage("Available warps are:");
    5. for(String arrayElement : strings)
    6. {
    7. player.sendMessage(ChatColor.GOLD + arrayElement);
    8. return false;
    9. }
    10.  
    11. }
    12. player.sendMessage("No warps have been set!");
    13. return false;
     
  25. Offline

    mactown21

  26. Offline

    dsouzamatt

    mactown21 Ah, that's probably why. I should really update that server :p
     
  27. Offline

    timtower Administrator Administrator Moderator

    dsouzamatt It is a outdated java error though. Running on a mac?
     
  28. Offline

    mactown21

    dsouzamatt and to send a message of a array list to a player you can use this

    Code:
        List<String> strings = getConfig().getStringList("LocationsList");
        String message = "";
        for(String s : strings) {
        message += s;
        message += "\n";
        }
        player.sendMessage(message);
     
  29. Offline

    dsouzamatt

    timtower Yes, I am. What should I do about it? Do I need to update java?

    mactown21 Thanks for that, I'm going out now but I'll try that code when I get back!
     
  30. Offline

    timtower Administrator Administrator Moderator

Share This Page