mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Only run EntityListener#checkParties on EntityCombustByEntityEvent if Parties are enabled
This commit is contained in:
parent
cdc187b211
commit
33c467e7ce
@ -259,7 +259,7 @@ public class EntityListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onEntityCombustByEntityEvent(EntityCombustByEntityEvent event) {
|
public void onEntityCombustByEntityEvent(EntityCombustByEntityEvent event) {
|
||||||
//Prevent players from setting fire to each other if they are in the same party
|
//Prevent players from setting fire to each other if they are in the same party
|
||||||
if(event.getEntity() instanceof Player defender) {
|
if(mcMMO.p.getPartyConfig().isPartyEnabled() && event.getEntity() instanceof Player defender) {
|
||||||
|
|
||||||
if(event.getCombuster() instanceof Projectile projectile) {
|
if(event.getCombuster() instanceof Projectile projectile) {
|
||||||
if(projectile.getShooter() instanceof Player attacker) {
|
if(projectile.getShooter() instanceof Player attacker) {
|
||||||
|
Loading…
Reference in New Issue
Block a user