Open ProgrammerDan opened 8 years ago
It will be fine if the Sharded server is using BetterShards.
We might need to add a timer or event handler for players who magically log in on a non-prison shard, though ... although that's more of a #131 thing.
@rourke750 convinced this precise issue (portaling out) isn't an issue for Sharded servers? If so, feel free to close. We should separately address/fix #131.
That'll only trigger if the player changes servers. The issue is for players going through end portals. That may not matter for us but will for other servers.
Will my fix just not trigger for sharded servers then?
No because that statement will never be reached because of https://github.com/Civcraft/PrisonPearl/blob/78d91565fc8d5340e66df84a5f1bbd2c5e836132/src/vg/civcraft/mc/prisonpearl/PrisonPearlUtil.java#L52
Tested it earlier, if an imprisoned player walks into a portal, he's put into an endless dying loop
In Sharded servers if the server that has the Prison Dimension contains portals of any kind, it might be possible for a prisoner to escape.
I made some fixes here: https://github.com/Civcraft/PrisonPearl/commit/78d91565fc8d5340e66df84a5f1bbd2c5e836132 to prevent it in the SMP world case with multiple worlds on a single server; and I think it might provide some measure of protection in the Sharded case as the event would probably be similar.
However, should be checked in to. This also feels like, in the Sharded case, very similar to #131