DevotedMC / Citadel

A Minecraft plugin to protect your chests and builds using in-game materials. Requires an attacker to break each block a certain number of times. Built for Spigot 1.14.4
https://www.devotedmc.com/citadel.html
BSD 3-Clause "New" or "Revised" License
2 stars 20 forks source link

Return null instead of raise ReinforcemnetFortificationCancelException exception #31

Closed Aleksey-Terzi closed 6 years ago

Aleksey-Terzi commented 6 years ago

Method Utility.createPlayerReinforcement now returns NULL if ReinforcementCreationEvent cancelled instead of raising ReinforcemnetFortificationCancelException exception.

This is useful to avoid exceptions (and therefore to increase performance) when player's action to reinforce block in bastioned field is cancelled using new commonSettings.cancelReinInBastionField option from Bastion plugin.

ProgrammerDan commented 6 years ago

I knew I was forgetting something!