mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
add option to disable exp gain hologram
please add these lines to your config.yml # Allows to toggle exp hologram from gaining experiences game-indicators: exp: enabled: false
This commit is contained in:
parent
d9f0444df0
commit
2a90717e56
@ -11,6 +11,7 @@ import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Color;
|
||||
@ -525,8 +526,10 @@ public class PlayerData {
|
||||
}
|
||||
|
||||
// display hologram
|
||||
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());
|
||||
if (MMOItems.plugin.getConfig().getBoolean("game-indicators.exp.enabled")) {
|
||||
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());
|
||||
}
|
||||
|
||||
value = MMOCore.plugin.boosterManager.calculateExp(null, value);
|
||||
value *= 1 + getStats().getStat(StatType.ADDITIONAL_EXPERIENCE) / 100;
|
||||
|
@ -3,6 +3,7 @@ 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;
|
||||
@ -86,8 +87,10 @@ public class Professions {
|
||||
exp.put(profession.getId(), exp.containsKey(profession.getId()) ? exp.get(profession.getId()) + value : value);
|
||||
|
||||
// display hologram
|
||||
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());
|
||||
if (MMOItems.plugin.getConfig().getBoolean("game-indicators.exp.enabled")) {
|
||||
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());
|
||||
}
|
||||
|
||||
int needed, exp, level;
|
||||
boolean check = false;
|
||||
|
@ -70,6 +70,11 @@ health-scale:
|
||||
enabled: true
|
||||
scale: 20
|
||||
|
||||
# Allows to toggle exp hologram from gaining experiences
|
||||
game-indicators:
|
||||
exp:
|
||||
enabled: false
|
||||
|
||||
# Players can swap their hotbar with the 9 inventory slots
|
||||
# right above it by pressing [swap items] while crouching.
|
||||
hotbar-swap: true
|
||||
|
Loading…
Reference in New Issue
Block a user