Villagers give XP now

This commit is contained in:
nossr50 2019-04-04 18:55:25 -07:00
parent 8538ac4e50
commit af744fa088
2 changed files with 6 additions and 5 deletions

View File

@ -9,6 +9,7 @@ Key:
Version 2.1.36
Updated German locale (Thanks OverCrave)
Fixed a bug preventing Villagers from giving combat XP
The /mcnotify command will now squelch almost all chat messages or action bar notifications sent to the player from mcMMO
mcMMO will now remind players on an hourly basis that they are are not receiving notifications from mcMMO if they have run the mcnotify command and toggled squelch mode
Added a new setting to advanced.yml "Feedback.PlayerTips", when set to true this will allow mcMMO to send periodic helpful messages to players, currently this only affects mcnotify reminders.

View File

@ -8,10 +8,7 @@ import com.google.common.collect.ImmutableSet;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.entity.NPC;
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
import org.bukkit.inventory.ItemStack;
import java.util.Collection;
@ -43,7 +40,10 @@ public final class Misc {
private Misc() {};
public static boolean isNPCEntity(Entity entity) {
return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || entity.getClass().getName().equalsIgnoreCase("cofh.entity.PlayerFake"));
return (entity == null
|| (entity.hasMetadata("NPC") && !(entity instanceof Villager))
|| (entity instanceof NPC && !(entity instanceof Villager))
|| entity.getClass().getName().equalsIgnoreCase("cofh.entity.PlayerFake"));
}
/**