Civcraft / PrisonPearl

Minecraft plugin for civcraft which allows players to imprison other players inside ender pearls
BSD 3-Clause "New" or "Revised" License
4 stars 16 forks source link

Prisoners might be able to escape the end #146

Open ProgrammerDan opened 8 years ago

ProgrammerDan commented 8 years ago

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

idoash4 commented 8 years ago

https://github.com/Civcraft/PrisonPearl/blob/master/src/vg/civcraft/mc/prisonpearl/listener/BetterShardsListener.java#L43

It will be fine if the Sharded server is using BetterShards.

ProgrammerDan commented 8 years ago

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.

rourke750 commented 8 years ago

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.

ProgrammerDan commented 8 years ago

Will my fix just not trigger for sharded servers then?

rourke750 commented 8 years ago

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

Maxopoly commented 8 years ago

Tested it earlier, if an imprisoned player walks into a portal, he's put into an endless dying loop