Merge branch 'master'

This commit is contained in:
Indyuce 2020-03-01 13:02:17 +01:00
commit 2ea339bc9b
4 changed files with 4 additions and 7 deletions

View File

@ -393,7 +393,7 @@ public class PlayerData extends OfflinePlayerData {
}
// display hologram
if (MMOCore.plugin.getConfig().getBoolean("game-indicators.exp.enabled"))
if (MMOCore.plugin.getConfig().getBoolean("display-exp-holograms"))
if (loc != null && MMOCore.plugin.hologramSupport != null)
MMOCore.plugin.hologramSupport.displayIndicator(loc.add(.5, 1.5, .5), MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", "" + value).message(), getPlayer());

View File

@ -3,7 +3,6 @@ package net.Indyuce.mmocore.api.player;
import java.util.HashMap;
import java.util.Map;
import net.Indyuce.mmoitems.MMOItems;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -87,7 +86,7 @@ public class Professions {
exp.put(profession.getId(), exp.containsKey(profession.getId()) ? exp.get(profession.getId()) + value : value);
// display hologram
if (MMOItems.plugin.getConfig().getBoolean("game-indicators.exp.enabled")) {
if (MMOCore.plugin.getConfig().getBoolean("display-exp-holograms")) {
if (loc != null && MMOCore.plugin.hologramSupport != null)
MMOCore.plugin.hologramSupport.displayIndicator(loc.add(.5, 1.5, .5), MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", "" + value).message(), playerData.getPlayer());
}

View File

@ -31,7 +31,7 @@ public class KillMythicMobExperienceSource extends SpecificExperienceSource<Stri
@Override
public void run() {
if (!event.getEntity().isDead()) return;
if (!(event.getKiller() instanceof Player)) return;
if (!(event.getKiller() instanceof Player) && !event.getKiller().hasMetadata("NPC")) return;
PlayerData data = PlayerData.get((Player) event.getKiller());
for (KillMythicMobExperienceSource source : getSources())

View File

@ -71,9 +71,7 @@ health-scale:
scale: 20
# Allows to toggle exp hologram from gaining experiences
game-indicators:
exp:
enabled: false
display-exp-holograms: true
# Players can swap their hotbar with the 9 inventory slots
# right above it by pressing [swap items] while crouching.