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

Missing brackets causes improper pearl validation #52

Closed erocs closed 9 years ago

erocs commented 9 years ago

https://github.com/Civcraft/PrisonPearl/blob/master/src/com/untamedears/PrisonPearl/PrisonPearl.java#L310

The conditional "if (item.getDurability() == id)" doesn't use brackets to define a block. The immediate statement which would be executed if true is only logging into feedback. After the logging the "return HolderVerReason.IN_CHEST" is reached and always executed. This prevents "return HolderVerReason.DEFAULT;" from ever being reached if the pearl isn't actually within an inventory.

Please add some brackets to fix.

ttk2 commented 9 years ago

on Civtest.