Skip to content

Commit 6ac05d4

Browse files
committed
merge: branch 'hotfix/disable-player-pvp' into develop
2 parents 214986c + 4f0fd87 commit 6ac05d4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
org.gradle.caching=true
22
org.gradle.parallel=true
33
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
4-
projectVersion=1.9.1
4+
projectVersion=1.9.2
55
libsPackage=team.devblook.akropolis.libs

src/main/java/me/zetastormy/akropolis/module/modules/world/WorldProtect.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,11 +554,14 @@ public void onEntityDamage(EntityDamageByEntityEvent event) {
554554
return;
555555

556556
FightModeManager fightModeManager = getPlugin().getFightModeManager();
557-
boolean attackedInFightMode = fightModeManager.isInFightMode(player.getUniqueId());
558-
boolean attackerInFightMode = fightModeManager.isInFightMode(event.getDamager().getUniqueId());
559557

560-
if (attackedInFightMode && attackerInFightMode) {
561-
return;
558+
if (fightModeManager != null) {
559+
boolean attackedInFightMode = fightModeManager.isInFightMode(player.getUniqueId());
560+
boolean attackerInFightMode = fightModeManager.isInFightMode(event.getDamager().getUniqueId());
561+
562+
if (attackedInFightMode && attackerInFightMode) {
563+
return;
564+
}
562565
}
563566

564567
if (event.getDamager().hasPermission(Permissions.EVENT_PLAYER_PVP.getPermission()))

0 commit comments

Comments
 (0)