forked from Upstream/mmocore
Merge branch 'master'
This commit is contained in:
commit
2ea339bc9b
@ -393,7 +393,7 @@ public class PlayerData extends OfflinePlayerData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// display hologram
|
// 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)
|
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());
|
MMOCore.plugin.hologramSupport.displayIndicator(loc.add(.5, 1.5, .5), MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", "" + value).message(), getPlayer());
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package net.Indyuce.mmocore.api.player;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import net.Indyuce.mmoitems.MMOItems;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
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);
|
exp.put(profession.getId(), exp.containsKey(profession.getId()) ? exp.get(profession.getId()) + value : value);
|
||||||
|
|
||||||
// display hologram
|
// 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)
|
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());
|
MMOCore.plugin.hologramSupport.displayIndicator(loc.add(.5, 1.5, .5), MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", "" + value).message(), playerData.getPlayer());
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class KillMythicMobExperienceSource extends SpecificExperienceSource<Stri
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!event.getEntity().isDead()) return;
|
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());
|
PlayerData data = PlayerData.get((Player) event.getKiller());
|
||||||
for (KillMythicMobExperienceSource source : getSources())
|
for (KillMythicMobExperienceSource source : getSources())
|
||||||
|
@ -71,9 +71,7 @@ health-scale:
|
|||||||
scale: 20
|
scale: 20
|
||||||
|
|
||||||
# Allows to toggle exp hologram from gaining experiences
|
# Allows to toggle exp hologram from gaining experiences
|
||||||
game-indicators:
|
display-exp-holograms: true
|
||||||
exp:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# Players can swap their hotbar with the 9 inventory slots
|
# Players can swap their hotbar with the 9 inventory slots
|
||||||
# right above it by pressing [swap items] while crouching.
|
# right above it by pressing [swap items] while crouching.
|
||||||
|
Loading…
Reference in New Issue
Block a user