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

Pearling yourself #54

Closed Maxopoly closed 9 years ago

Maxopoly commented 9 years ago

If you kill yourself with splash damage potions, you can pearl yourself. Your pearl will not drop and as soon as you run /ppl, it will say you were freed, but you won't get teleported out of the end. Someone confirmed me, that this bug has existed for a long time. Ways to abuse this are: Pearling yourself while being combattagged to escape an attacker (if you have a rough understanding of pvp, this allows you to completly avoid ever getting pearled), Freeing yourself while being summoned and basically teleporting yourself into the end for the cost of an enderpearl and a splash damage potion.

ttk2 commented 9 years ago

So would we just want to forbid pearling yourself? that would be an easy enough check.

Maxopoly commented 9 years ago

Yeah, that would fix it.

WildWeazel commented 9 years ago

But then what happens? If you're combat tagged by someone else and then pot yourself, just dying and respawning elsewhere is effectively the same thing.

ttk2 commented 9 years ago

this is true, but since you should drop the pearl when you pearl yourself an attacker could pick it up (defeating the escaping pearling bit which is all I was really worried about. )

Maxopoly commented 9 years ago

You dont drop the pearl currently, it just disappears and you will be freed as soon as you run /ppl.

ttk2 commented 9 years ago

well then if we can fix that this bug will be corrected.

WildWeazel commented 9 years ago

Right, I think the lack of pearl drop is the real issue here not that you're doing it to yourself.

sepiatonal commented 9 years ago

From my understanding of the code, when you're killed, PrisonPearl loops through the list of everybody that's got you CTed and gives your pearl to the most recent player who's hit you and has a pearl. It could be changed so a pearl drops if you kill yourself, but then if the chunk is still loaded by another player and you weren't in a battle you wouldn't be freed until the pearl despawned, and if the chunk was unloaded you'd still have to get sent to the end and type /pplocate to free yourself, which feels buggy. It could also just be changed so you can't pearl yourself. That actually wouldn't make it possible to get out of battle by killing yourself; your pearl would just be given to the most recent player other than yourself who hit you, assuming you're CTed. The same way it works when you die while CTed normally.

I can try to implement whatever fix sounds good to you guys, if nobody else is already working on it. Personally I think it would be best to make it so you can't pearl yourself. That way if you killed yourself out of battle then you wouldn't be sent to the end at all, and if you killed yourself in battle then your pearl would be given to the next guy in line as normal.

ttk2 commented 9 years ago

I think dropping the pearl is by far the best solution.

rourke750 commented 9 years ago

@Xavter Giving this one to you.

jjj5311 commented 9 years ago

I think this should have been solved in #55 was there ever testing to confirm you can no longer pearl yourself with this method?

Maxopoly commented 9 years ago

Just tried, you can still do it. Also pearls in unloaded chunks dont get freed, it was simply saying my pearl was being held by nobody, while the chunk was 100% sure not loaded ( noone else was on the server)

jjj5311 commented 9 years ago

But were you holding the pearl when you were sent to the end? I don't know about the chunk unloading issue

Maxopoly commented 9 years ago

No, the pearl dropped instead of disappearing, like before. I didn't have the pearl when I got into the end, but was able to get it after I freed myself over a command.

jjj5311 commented 9 years ago

sorry im confused... which command did you use to free yourself? And do you mean it came into your inventory or you traveled to where it dropped and picked it up?

Maxopoly commented 9 years ago

I used /ppfreeany maxopoly to free myself, because I had no other way of getting out and then spawned at the location where I died and was able to pick up my own pearl(though it turned into a normal pearl after ~30 seconds).

jjj5311 commented 9 years ago

well the pearling yourself part seems to be working as intended then. Before you would spawn in the end with your own prison pearl... as for the other issues/chunk unloading/ someone else will hopefully be able to shed some light on that

On Mon, Jul 27, 2015 at 1:19 PM, Maxopoly notifications@github.com wrote:

I used /ppfreeany maxopoly to free myself, because I had no other way of getting out and then spawned at the location where I died and was able to pick up my own pearl(though it turned into a normal pearl after ~30 seconds).

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/PrisonPearl/issues/54#issuecomment-125294414 .

ttk2 commented 9 years ago

so can we close this?