Cuberite Forum

Full Version: Login spawn point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
DiamondToaster might have a plugin for that. When I join his server I always end up at the spawn.
Yep, that's part of my Smash Bros. plugin. I could take just that section and turn it into a small plugin.
It does make sense to separate it from each other Wink
I originally made it to keep people out of the arenas when the plugin reloaded. Tongue

Here you go. Open the script and change the spawn values accordingly.
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)
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. Tongue 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. Smile

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. Big Grin