mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-19 05:42:04 +01:00
Stop allay picking up loot if protected
This commit is contained in:
parent
a64ad43d11
commit
552d25494b
@ -61,6 +61,13 @@ public class AllayController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPickUpLoot() {
|
||||
if (npc != null && npc.isProtected())
|
||||
return false;
|
||||
return super.canPickUpLoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canRide(Entity entity) {
|
||||
if (npc != null && (entity instanceof Boat || entity instanceof AbstractMinecart)) {
|
||||
|
@ -92,7 +92,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
|
||||
ProfilePublicKey ppk, NPC npc) {
|
||||
super(minecraftServer, world, gameProfile, ppk);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
||||
if (npc != null) {
|
||||
skinTracker = new SkinPacketTracker(this);
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user