Inactive [GEN] SpawnControl v0.8.3 - Per-Player/Group Spawns (Now on DevBukkit) [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Timberjaw, Jan 21, 2011.

  1. Offline

    Timberjaw

    SpawnControl v0.8.3

    Announcement:
    SpawnControl is being superseded by HomeSpawnPlus, a more advanced plugin that supports all of SC's features, and many more. Your homes and spawns can be imported directly from SpawnControl into HomeSpawnPlus.
    Feel free to contact me with questions/concerns/complaints.




    Tested with CraftBukkit 1060.

    DevBukkit Page: SpawnControl
    Bug Reports: SpawnControl Issue Tracker

    Features:
    • Per-player /home and /sethome
    • Per-group /groupspawn
    • Precise /spawn and /setspawn override
    • Per-world global, group, and player spawns
    • [NEW] Cooldowns for /home, /sethome, /groupspawn, and /spawn
    • Optional respawn on death
    • Optional respawn on join
    • Toggles for home, groupspawn, and globalspawn features
    • Imports player homes from spawncontrol-players.properties
    • Imports group spawns from spawncontrol-groups.properties
    Details:

    This is a more full-featured release by far. Group spawns and global spawn are now supported. I'm detecting 'new' players (for global spawn) by checking their group (new players will be in Default) and looking for an existing home entry. If no home entry is found, the player will be teleported to the global spawn and their home will be set to the global spawn location. If someone has a better method for detecting this, I'd love to hear it.

    The following permissions are available:
    • SpawnControl.sethome.basic
    • SpawnControl.sethome.proxy
    • SpawnControl.home.basic
    • SpawnControl.spawn.use
    • SpawnControl.spawn.set
    • SpawnControl.groupspawn.use
    • SpawnControl.groupspawn.set
    • SpawnControl.CooldownExempt.* (Sub-nodes: *, home, sethome, groupspawn, spawn)
    • SpawnControl.config (for /sc_config [setting] [value])
    • SpawnControl.import (for /scimportconfig and /scimportgroupconfig)
    Dependencies:
    Installation:
    1. Download SpawnControl.jar and place it in your bukkit plugins folder
    Optional Installation Steps (for Permissions support):
    1. Download the Permissions plugin and install it
    2. Add SpawnControl entries to your Permissions config as desired
    Commands:
    • /spawn - go to global spawn
    • /setspawn - set the global spawn to your current location
    • /home - go home
    • /sethome - set your home to your current location
    • /groupspawn - go to your group spawn
    • /setgroupspawn [group] - set the group spawn for the specified group to your current location
    • /sc_config [setting] [value] - alter a configuration setting
    Settings:
    • enable_home - Enables or disables /home and /sethome (0 = disabled; 1 = enabled) [Default: 1]
    • enable_groupspawn - Enables or disables /setgroupspawn and /groupspawn (0 = disabled; 1= enabled) [Default: 1]
    • enable_globalspawn - Enables or disables /setspawn, /spawn, and /globalspawn (0 = disabled; 1 = enabled) [Default: 1]
    • behavior_death - Specifies the behavior when a player dies (0 = disabled - user returns to vanilla spawn; 1 = home; 2 = group spawn; 3 = global spawn) [Default: 3]
    • behavior_join - Specifies the behavior when a player joins the server (0 = disabled - user spawns at last position; 1 = home; 2 = group spawn; 3 = global spawn) [Default: 0]
    • behavior_spawn - Specifies the behavior of the /spawn command (0 = global spawn; 1 = group spawn; 2 = home)
    • behavior_globalspawn - EXPERIMENTAL - Specifies the behavior when setting spawn (0 = does not override map spawn, 1 = overrides map spawn)
    • cooldown_home [seconds] - Sets a cooldown in seconds for the /home command
    • cooldown_sethome [seconds] - Sets a cooldown in seconds for the /sethome command
    • cooldown_groupspawn [seconds] - Sets a cooldown in seconds for the /groupspawn command
    • cooldown_spawn [seconds] - Sets a cooldown in seconds for the /spawn and /globalspawn commands
    Downloads:

    Known Issues:

    • None?
    Changelog:

    • 0.1 - First Bukkit release. Basic /home and /sethome support
    • 0.2 - Group and global spawns, Permissions integration
    • 0.3 - Working respawn on death; respawn on join (optional); configuration options
    • 0.4 - Updated to use new OnCommand system
    • 0.5 - Now uses PLAYER_RESPAWN; added basic multiworld support; added experimental (optional) globalspawn behavior; added missing /globalspawn command
    • 0.6 - Proper multi-world support with per-world spawns
    • 0.7 - Added command cooldowns; Permissions is now optional
    • 0.8 - Fixed multiworld spawns; recompiled against CB #617; removed deprecated method calls
    • 0.8.1 - Updated deprecated world loading method; tweaked spawn log message
    • 0.8.2 - Switched cooldown time handling from server time to system time
    • 0.8.3 - Added Hidendra's pull to support Bukkit's native permissions
    • Full changelog
     
    Michonne, Huddl, BadgerLove and 5 others like this.
  2. Offline

    Timberjaw

    ENTITY_DEATH is in the latest CraftBukkit builds (I'm testing on 195). I'm wrestling with the respawn process though; the location auto correction seems to be more tenacious in Bukkit than it was in hMod. Will keep everyone posted.
     
  3. Offline

    berneckas

    Any clues how to fix my problem ?
    --- merged: Feb 1, 2011 4:56 PM ---
    After launching this i got this error. Sorry that i didnt posted before, because i got almsot everytime errors when i launch start.bat.
    [​IMG]
     
  4. Offline

    EvilSeph

  5. Offline

    Timberjaw

  6. Offline

    EvilSeph

    Thanks :)
     
  7. Offline

    Timberjaw

    Your config.yml file is not properly formed. Check line 3. It seems to be having trouble with 'permissions:', specifically the colon on the end.

    If you're still having trouble, go to http://pastebin.com/, paste the contents of your config.yml file in, hit Submit, and then post a link here to the url pastebin produces.
     
  8. Offline

    ledhead900

    @Timberjaw

    Hows the Respawn work comming along?
     
  9. Offline

    Timberjaw

    Well, onPlayerTeleport is buggy (can't cancel/redirect the respawn teleport), so I'm looking for workarounds. The most likely one at this stage is: cancel DEATH, manually drop the player's items, teleport to spawn/home. No death screen, which kinda sucks, but it's the most reliable method I can think of right now (and doesn't rely on threads/waiting).
     
  10. Offline

    ledhead900

    I see, If you plan to do this maybe a Fake messege is in order to tell the player what just happend.

    Are you sure you cant intoduce a count down like in a config, so for example u can easily skip te death screen but before u /spawn make it say YOU HAVE DIED and a count down with default value of 10s before respawn or something like that.
     
  11. Offline

    Timberjaw

    A message would definitely be in order. A countdown might be problematic as you also have to prevent them from moving, picking things up, etc in the meantime.
     
  12. Offline

    ledhead900

    Oh I was thinking if there was any way to keep them dead, during this time. There as an idea dunno who well it would work but you could tie in with permissions and have it disable there build rights until they have spawned, then again that wont work so well as currently reloading in bukkit is less then satisfactory and often makes more issues then would have been to just restart the server.

    I got an idea then
    you could have it place a box around the player with the blockID changable in the config tho that could be an issue as well.

    maybe just make a new spawn command like call it /setdeath and then on death call /spawndeath. Then Players to can shoose to have them spawn at spawn loction or make a specific DEATH room.

    IS there anyway of implimenting respawn at ALL into the death screen or making a player not able to move for a dertimined set of time maybe having him or her be tp back to ther death location if they move.

    Maybe you clould even tie in with the plugin called cleaner or essentials cleaninventory command to make it FORCE deletion of there inventory on death, ACtually you could make it do this anyway since Inv hooks are in bukkit now.
     
  13. Offline

    Timberjaw

    Much of the respawn process seems to be hardcoded into the client. From what I can glean, it goes like this:
    1. Server says the player is dead, drops inventory (but strangely doesn't tell the client about the inventory yet)
    2. Client switches to dead mode, shows respawn screen
    3. Client hits respawn, presumably tells server about it
    4. Server teleports dead player to spawn
    5. Server restores health to player, tells client player is alive
    6. Client stops showing respawn screen
    Once the client realizes that the player is dead (steps 1 and 2), there's basically nothing useful you can do until after the respawn teleport is complete and the player's health is restored. You can't stop the respawn event, you can't change the destination of the respawn event. In hMod I waited for the player's health to change from a negative to positive value (hMod had an onHealthChange event that Bukkit lacks), which worked because the health restoration is after the teleport.

    That's why all the workable workarounds right now fall into two camps:
    1. Wait (using a timer or perhaps by checking for onPlayerMove) until after the respawn teleport is complete, then teleport the player.
    2. Cancel the death event itself so you don't have to deal with the hardcoded server/client shenanigans.
    The idea you mentioned of putting them in a 'death box' and requiring them to use a respawn command is interesting (I think there was an hMod 'spawn jail' plugin that did something similar), but probably outside the scope of SpawnControl.

    I think I'll go with the cancel-death solution and see how that works out
     
  14. Offline

    berneckas

  15. Offline

    Timberjaw

  16. Offline

    berneckas

    Where I need to write this ? :

    SpawnControl.sethome.basic
    SpawnControl.sethome.proxy
    SpawnControl.home.basic
    SpawnControl.spawn.use
    SpawnControl.spawn.set
    SpawnControl.groupspawn.use
    SpawnControl.groupspawn.set
    SpawnControl.import (for /scimportconfig and /scimportgroupconfig)
     
  17. Offline

    Timberjaw

    @berneckas:
    You need to put those in the 'permissions:' block(s) in the 'groups:' section of config.yml. For example, in the file I linked, the 'Mods' group has access to:

    - 'SpawnControl.home.basic'
    - 'SpawnControl.spawn.use'
    - 'SpawnControl.sethome.basic'

    Add whichever permissions you want to the applicable groups.
     
  18. Offline

    berneckas

    Ok it works(for admin for sure i dont know how for users.). Thank you for help. You will get free cookie for help :D !
     
  19. @Timberjaw:
    I just noticed an odd behavior on my server, probably should have noticed it sooner, but i use godmode at admin while making stuff.
    I have a spawn set, and /spawn sends the player there perfectly fine, just as it should :D
    HOWEVER, if you die, you respawn at the spawn the server originally created.
    I tried the same on a completely fresh server and world (to make sure no other plugin had messed with the spawn) and it behaves the same.
    Any idea what might be wrong?
     
  20. Offline

    Timberjaw

    Respawn on death isn't supported yet.

    It will be very soon though, at least in some capacity (Bukkit is missing some hooks that would be nice to have). Most likely today.
     
  21. Offline

    ledhead900

    @Timberjaw
    /Spawn does nothing but print ?/Spawn to chat on the latest version of bukkit and craftbukkit 210+

    Niji Permission has been updated to version 2.x not sure if that has anything to do with it.

    /globalspawn works as it should
    /groupspawn works as it should

    I changed nothing just updated Essentials and enabled its setspawn just so I could re set the spawn to see if it fixed the spawn protection issue as a newly generated world on my TEST server proved the size was reduced greatly for block protection radius. I DISABLE ALL OTHER spawn commands in Essentials.

    The the above issue is on my LIVE server, I should really have tested this plugin after the update, was not expecting it to break /spawn

    Is it just me ?
     
  22. Offline

    Timberjaw

    @ledhead900
    I'm using General (2.1), not Essentials, and /spawn is working fine on CraftBukkit 218. I'm still on Permissions 1.6 though (ancient, I know). If /globalspawn is working but /spawn isn't, I'm betting it's a conflict with Essentials or a permissions issue. /globalspawn and /spawn are handled by the exact same piece of code in SpawnControl.
    --- merged: Feb 2, 2011 2:26 PM ---
    Updated! v0.3 adds respawn on death, respawn on join (optional), and a variety of configuration options. See the OP for configuration details.

    Note that this uses the cancel-death workaround discussed previously in this thread. This means that you will NOT see the death screen when you die. Your inventory will be dumped on the ground at your location, and you will be teleported to home/groupspawn/spawn. If this workaround isn't to your liking, you can disable the respawn on death behavior (reverting to the vanilla spawn as in 0.2.3).
    --- merged: Feb 2, 2011 2:27 PM ---
    One more note. 0.3 adds a new table to the SpawnControl database. I ran the upgrade on my server's live db (after making a backup) and didn't encounter any problems, but it would be prudent to make a backup before upgrading to 0.3. Just in case. :)
     
  23. Great... But... It's killing my players when they fall - I have fall damage off and the players are used to this so this is kind of a problem :p.
     
  24. Offline

    Timberjaw

    Hmm. I hadn't considered that. What's the no-fall-damage plugin?
     
  25. WorldGuard.
     
  26. Offline

    Timberjaw

    Ok. WorldGuard is using a higher priority (which is good); I should be checking to see if the event has already been cancelled before processing it. Will update.
    --- merged: Feb 2, 2011 4:10 PM ---
    @Pawned
    Updated! Give 0.3.1 a shot. The fall damage issue should be resolved, unless I'm missing something.
     
  27. Thanks :D Will try now.

    EDIT: Seems to be working :). Thanks a lot :).

    @Timberjaw
    EDIT2: Maybe not, seems I wasn't jumping from high enough :p. Still killing on fall.
     
  28. Offline

    Timberjaw

    Turns out I'm dumb. Or the Bukkit priority list is dumb. Normal is executed before High.
    --- merged: Feb 2, 2011 4:28 PM ---
    Try the attached file (v0.3.2). Changed priority to Highest so it should be executed after WorldGuard.
     

    Attached Files:

  29. That fixed it :D. Thanks so much for your time and effort :).
     
  30. Offline

    Juze

    Please, add the v0.3.2 download to OP, I had to check from here.
     
  31. Offline

    Timberjaw

    @Juze
    The .jar in the OP was pointing to 0.3.2 at the time of your posting.
    The .zip has been updated now.
     

Share This Page