Check that using CampfireStartEvent before comparing campfire types

This commit is contained in:
Intelli 2023-08-23 17:08:20 -06:00
parent 0edf160f43
commit 34421b64f7

View File

@ -642,7 +642,7 @@ public final class PlayerInteractListener extends Queue implements Listener {
});
*/
}
else if ((type == Material.CAMPFIRE || type == Material.SOUL_CAMPFIRE) && CampfireStartListener.useCampfireStartEvent) {
else if (CampfireStartListener.useCampfireStartEvent && (type == Material.CAMPFIRE || type == Material.SOUL_CAMPFIRE)) {
ItemStack handItem = null;
ItemStack mainHand = player.getInventory().getItemInMainHand();
ItemStack offHand = player.getInventory().getItemInOffHand();