Ignore mypets in listeners
This commit is contained in:
parent
366cb327a4
commit
bf491d649a
6
pom.xml
6
pom.xml
|
|
@ -196,6 +196,12 @@
|
|||
<version>5.7.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- MyPet -->
|
||||
<dependency>
|
||||
<groupId>de.keyle</groupId>
|
||||
<artifactId>mypet</artifactId>
|
||||
<version>3.11-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<distributionManagement>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package me.ryanhamshire.GriefPrevention;
|
||||
|
||||
import de.Keyle.MyPet.api.entity.MyPetBukkitEntity;
|
||||
import me.ryanhamshire.GriefPrevention.events.PreventPvPEvent;
|
||||
import me.ryanhamshire.GriefPrevention.events.ProtectDeathDropsEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
|
|
@ -1235,7 +1236,7 @@ public class EntityEventHandler implements Listener
|
|||
if (damageSource != null && damageSource.getType() == EntityType.FIREWORK && event.getEntity().getType() != EntityType.PLAYER)
|
||||
return;
|
||||
|
||||
if (sendErrorMessagesToPlayers)
|
||||
if (sendErrorMessagesToPlayers && !(event.getEntity() instanceof MyPetBukkitEntity)) // don't send the error message if it's a mypet
|
||||
{
|
||||
GriefPrevention.sendMessage(attacker, TextMode.Err, noContainersReason.get());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user