Login spawn point - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Discussion (https://forum.cuberite.org/forum-5.html) +--- Thread: Login spawn point (/thread-1829.html) |
Login spawn point - elgholm - 03-10-2015 Is there some way to always has the user spawn at a certain point when login in? As it is (per default?) the server remembers the position, and I don't want that. /Charlie RE: Login spawn point - NiLSPACE - 03-10-2015 DiamondToaster might have a plugin for that. When I join his server I always end up at the spawn. RE: Login spawn point - DiamondToaster - 03-11-2015 Yep, that's part of my Smash Bros. plugin. I could take just that section and turn it into a small plugin. RE: Login spawn point - NiLSPACE - 03-11-2015 It does make sense to separate it from each other RE: Login spawn point - DiamondToaster - 03-11-2015 I originally made it to keep people out of the arenas when the plugin reloaded. Here you go. Open the script and change the spawn values accordingly. RE: Login spawn point - NiLSPACE - 03-11-2015 Wouldn't this work fine: function OnPlayerSpawned(a_Player) if (not --[[ Is In Arena]]) then return false end -- Teleport to spawn end cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_SPAWNED, OnPlayerSpawned) RE: Login spawn point - DiamondToaster - 03-11-2015 Well, if a Player relogs, then the plugin kicks him from the arena automatically to prevent him from being able to log back in and win. When the entire plugin is reloaded, the current game data is lost and kicks everyone to prevent interference with people being stuck/entering arenas. A very rough and hackish solution to a weird problem. Also, the Smash Bros. plugin had a more "dedicated server" approach so it doesn't expect any other plugins to be present. That will be fixed with my rewrite. Also, I'm having a really weird bug that I can't seem to fix, if anyone wants to look at the GitHub repo, feel free to point stuff out. https://github.com/DevToaster/MCArena EDIT: Never mind, I found the problem. I forgot tables passed values in reference and not in pure values which caused the auto-updating. Silly me. |