[MECH][TP] Graveyard v0.4.4 - Multiple player respawn locations. [1317]

Discussion in 'Inactive/Unsupported Plugins' started by McSpazzy, Apr 7, 2011.

  1. Offline


    Graveyard - Allows server operators to define multiple respawn points.
    Version: v0.4.4

    Just put in plugins directory and off you go. Config files generated on the fly.
    Built and tested with Craftbukkit 1317.

    New development site =D

    • Allows admins to define names and coordinates in config files.
    • Players respawn at closest point.
    • Permissions support for commands.
    Note: This currently overrides many other plugins spawn management.


    /gy add SpawnName​
    /gy delete SpawnName​
    /gy list​
    /gy list world​
    /gy closest​
    /gy tp SpawnName​
    /gy tp closest​
    /gy tp random​
    /gy info​
    /gy reload​
    /gy version​

    Feel free to add as many words in the name as you want. Such as 'Super happy fun spawn point of doom' or something equally as awesome.


    Download v0.4.4
    Download v0.4.3
    Download v0.4.2
    Download v0.4.1
    Download v0.4

    To Do:
    • Point discovery.
    • Proper documentation.
    Coming in next version (Probably):

    Change log:
    Version 0.4.4 - Some pretty big changes.
    • No longer requires permissions to work. If no permissions plugin installed it will automatically let all players spawn at all points.
    • Supports PEX and PermissionsBukkit
    • Took the bed support out for now till I can find a better way to implement it.
    • New points are automatically in the 'default' group which needs no permissions to spawn at, just the graveyard.respawn.closest or random.
    • Updated the configuration code to reflect changes in the new RB.
    Version 0.4.3
    • Option to enable an invincible timer on respawn.
    • Threaded file IO
    • Added commands '/gy tp random' and '/gy tp closest'
    Version 0.4.2

    • Configurable option to check/auto notify if there is a new version
    • Permission to change between closest or random spawn point.
    • Allow beds to be used. If set to true in config, will attempt to spawn player at their bed, if that fails, will default to the random/closest permission.
    Version 0.4.1

    • Added a '/gy reload' command to reload all points.
    Version 0.4

    • Changed permissions to PermissionsBukkit
    • Added per point permissions
    • Added more commands
    • Rewrote some of the code
    Older Versions (open)

    Version 0.3.9pre
    • Support for PermissionsEX.
    Version 0.3.8

    • Custom respawn strings. Change the closest point's by using '/gy message message here'. You can set it to '/gy message none' for no message.
    • Multiworld support.
    • Took out permissions for now...I know, I'm a terrible person.
    Version 0.3.7

    • Fixed the bug caused by the new CB preventing the multiple spawns from working.
    Version 0.3.6

    • Some general code cleanups
    Version 0.3.5

    • Removed support for Towny, will re-add soon.
    • Fixed null when trying to TP to a non existant point.
    • Updated command list
    Version 0.3.2

    • Added support for Towny.
    Version 0.3.1

    • Fixed not creating folders on first load bug. Thanks to @spowney for pointing out my stupid mistake. =D (I forgot to put it back in after the code rewrite)
    Version 0.3

    • Changes to the commands.
    • Changes to the storing of spawn points.
    • Better permissions support.
    Version 0.3pre

    • Basic permissions support.
    • Additional fixes and updates.
    Version 0.2.1

    • This is only an intermediate release to address important bugs and compatibility issues.
    • New add coordinate command that works in game as well as from the console.
    • Fixed a few of the command catch errors. So there should be no more console error spamming.
    • The graveyard points now supersedes beds and other plugins. (The ones I tested) Except those plugins which have their priority set to highest.
    Version 0.2

    • Added in game add point command. (Remove and list still coming)
    Version 0.1

    • Initial Release

    I'm still working on it. Just wanted to get a base version out to feedback/bug reports/feature demands. I'll be adding the commands in as soon as I've finished typing this.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
    AS1LV3RN1NJA and kahlilnc like this.
  2. Offline


    Working awesome so far :)
    All we need is permissions, or
    in the config.
    And ingame /graveyard add <name>, /graveyard del <name> commands,
    (which you already mentioned in the thread)
    But yeah, this is awesome :D
  3. Offline


    Yeh, I'm half way though the add command. Making things break proof is a pain.
  4. Offline


    There's another thing: I placed a spawnpoint in my city. But whenever someone dies, and spawn at it, there's a voidhole and they die again. Give me a second and I'll try other locations as well.

    Edit: [​IMG]

    My points.txt:

    Spawn and Ethicur are fine. But even if I move the Siwah point to another chunk, that same chunk disappears client-side when you die.

    When someone spawns at this error point, they get a bug that:
    - Makes the player invincible
    - Makes other plugins unable to change your inventory (for example: I write /i stone 64. Chat confirms that it gave me the item. Nothing shows in my inventory before I right-click with the slot replaced in my inventory. Same with /clearinventory or Cleaner's /clean -f.

    I'm guessing the problem lies in Siwah starting with a positive coordinate number.
    My config by the way:
  5. Offline


    I'm starting to think there may be a bug in bukkit's setRespawnLocation().
    I noticed during testing before that when i die, entities, such as the mobs that kill me, become invisible. Even if I am no more than 10 blocks away from the spawn point.
    Perhaps these issues are related to the same problem. As there is nothing in my code that changes anything even remotely related to chunk or entity loading. 90% of the code is reading the config files and the trig calculations.

    On another note...its 230am should probably get to sleep soon. The commands are almost done! =D Thanks for your testing, and if you are still using it till I can find a fix. Let me know if anything else comes up.
    AZUMIKKEL likes this.
  6. Offline


    A possible fix would be teleporting the player to the spot, after he spawned normally.
  7. Offline


    Possibly. I'll give it a look. Would only require one line of code change =D
  8. Offline


    I'll be waiting :3
  9. Offline


    No go. Tried it. It wont teleport on spawn. I think the PlayerRespawnEvent code is teleporting their dead bodies to the location THEN respawning them, so they spawn back at default place.

    One alternative I did think of. Which would require a little more code. Was hooking into the EntityDeathEvent. And on death, teleporting their dead bodies and then reviving them. A little more on the necromancer side =p
  10. Offline


    o_o sure thing
  11. Offline


    Updated to 670, add code is almost done. Will have a new release soon!
  12. Offline


    This is an awesome idea, I'm looking forward to being able to add points ingame.

    I do have a request, however. Would it be possible to assign a graveyard to a certain permission or faction or something like that? I run a PvP that basically has two factions. It would be amazing if a faction could only spawn at their own graveyards.
  13. Offline


    Updated to add points in game and for CB 670. =D
  14. Offline


    Sweet. The void problem is gone too.
    Great job!
  15. Offline


    Finally! Something to make checkpoints! I've been trying to find something like this for my adventure map. The best I came up with was combining a "set-spawn" plugin with sent commands via signs, but that just ends up making the sign the spawn point. >.> This will work out much better!

    Suggestion: Maybe try turning this into/adding an optional 'checkpoint' system? E.g., players get within 10-20 blocks of one of the set spawn points and it then sets their spawn to that point, possibly with a notification in the chat window. That way when players reach the entrance of a dungeon, should they die they then are back at the dungeon start.

    Granted, this will work just fine as it is right now, but having points activated rather than just going to the nearest one would prevent confusion/cheats if say, players are locked outside a city wall with the objective of opening a gate, but there's a spawn point inside the city. They die outside the wall and just happen to pop back up inside some building or the town square. :p (Yes, I can think of ways to avoid this, placing spawn points around the city, etc., but activated points would make things simpler.)
    dak393 likes this.
  16. Offline


    I think this conflicts with mcMMO, witch really sucks because I wanted to use this so bad. I know this works because it says in chat "Respawning at Graveyard1" but I'm at my /setmyspawn that's included in mcMMO. :(

    Even if I disabled it, or /clearmyspawn, it still takes me to the place where you first login.
  17. Offline


    @Snowybearr I can confirm it doesn't work with McMMO as well. I set a spawn point near my town and suicided, only to be taken back to my bed which is my spawnpoint as set by McMMO.

    Since I'd like to be able to add graveyards outside of my dungeons for users instead of them having to run back upon a death, getting this to work with McMMO would be wonderful.
  18. Offline


    whenever I try to add a graveyard it gives me this : "An internal error occurred while attempting to perform this command" HELP
  19. Offline


    Love the idea of this, it's great for a big city map.

    Having problems, though:
    Show Spoiler
    2011-04-12 19:38:35 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-646-gb61ef8c-b670jnks (MC: 1.4)
    2011-04-12 19:38:35 [INFO] Preparing level "Pandora"
    2011-04-12 19:38:35 [INFO] Preparing start region
    2011-04-12 19:38:35 [INFO] 144 recipes
    2011-04-12 19:38:36 [INFO] [Graveyard] Loading Config File
    2011-04-12 19:38:36 [INFO] [Graveyard] Loading Point: Sandy House
    2011-04-12 19:38:36 [INFO] [Graveyard] Loading Point: Tree House
    2011-04-12 19:38:36 [INFO] [Graveyard] Loading Point: Dirt House
    2011-04-12 19:38:36 [INFO] [Graveyard] Successfully loaded 3 spawn points
    2011-04-12 19:38:36 [INFO] [Graveyard] v0.2 loaded successfully!
    2011-04-12 19:38:36 [INFO] Done (0.087s)! For help, type "help" or "?"
    2011-04-12 19:38:39 [INFO] Plugins: Graveyard
    2011-04-12 19:38:44 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'graveyard' in plugin Graveyard v0.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:246)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:391)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:377)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at com.McSpazzy.Graveyard.GraveyardCommands.onCommand(GraveyardCommands.java:43)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 6 more
    2011-04-12 19:38:48 [INFO] LostSoulFly [/] logged in with entity id 427
    2011-04-12 19:38:52 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'graveyard' in plugin Graveyard v0.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:254)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:596)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:559)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at com.McSpazzy.Graveyard.GraveyardCommands.onCommand(GraveyardCommands.java:43)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    2011-04-12 19:38:55 [INFO] LostSoulFly lost connection: disconnect.quitting
    2011-04-12 19:38:55 [INFO] Connection reset
    2011-04-12 19:38:57 [INFO] Stopping the server..
    2011-04-12 19:38:57 [INFO] CONSOLE: Stopping the server..
    2011-04-12 19:38:57 [INFO] Stopping server
    2011-04-12 19:38:57 [INFO] [Graveyard] v0.2 unloaded successfully!
    2011-04-12 19:38:57 [INFO] Saving chunks
    2011-04-12 19:38:57 [INFO] Stopping server

    Both default, even tried wiping them/deleting the folder and letting it be recreated to no avail.
    points.txt (open)
    Sandy House:336.5:68.0:-87.5
    Tree House:372.5:81.0:-35.5
    Dirt House:486.5:67.0:-89.5

    points.txt (open)
    #Minecraft Properties File
    #Sat Apr 09 17:00:20 EST 2011
  20. If this could have a command to set a specific spawn for new players, it would be PERFECT! I love your plugins McSpazzy. I can't seem to get enough. :p
  21. Offline


    Ill be trying it out tonight, didnt noticed you had made it off of my specifications.
  22. Offline


    Sorry it's been a few days since I last checked this thread.

    @overlordror @Snowybearr I'll install McMMO and see if i can make them compatible.
    @switch I'll be adding permissions support to the next version.
    @Harushimo I'll see if i can add the discover point first thing. Which should settle your concerns. Also I'll look into the possibility of the option of last point visited, or closest point.
    @LostSoulFly @Drewclam What commands exactly were you trying?

    I need to make the config files self generate, ill work on that too. Seems like a lot of people want to use this =D

    Also whoever is concerned with it. the recording of who has discovered what point. mysql, sql lite, flat file? What is the general consensus. I can add the option to choose...eventually =D but what first.
  23. Offline


    I got a question though, since 1.4 if users go into a bed, it set that as their spawn, does this conflict?
  24. Offline


    @BioRage Not sure, ill check it out.

    It does, Fixed. =D

    I set graveyards plugin priority to high, so it gets final choice in where people respawn. This will have no effect on commands teleporting people to their set spawn points, only on their death.

    Saying that, I'm sure I can add permissions to change that. =D

    @overlordror @Snowybearr Was the respawning issue the only thing you noticed in McMMO?
  25. Offline


    @McSpazzy Great! Still waiting on RealTools request.

  26. Offline


    @BioRage Lol...yeah, the problems of working on multiple plugins. I'll go post an update on that thread.
  27. Offline


    The only thing I noticed was that it was setting the /myspawn command higher than the graveyard. I set a graveyard spawn next to a church I had built and died further out so that I made sure the GY was closer, but it still sent me to my bed across town.
  28. Offline


    @overlordror Yeh I'm pretty sure I've fixed that problem.
  29. Offline


    I'll reinstall the plugin tomorrow when I'm doing my regular maintenance and let you know how it goes, then. If the problem is solved you've just put us one step closer to being even more RPG like. :)
  30. Offline


    /graveyard and /gy, both give the same error, with or without other plugins running and OPd

Share This Page