mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-23 10:35:22 +01:00
Optimized settings and added option to only view holograms on look.
This commit is contained in:
parent
7140caecf9
commit
0d842fa30b
@ -2,6 +2,7 @@ package com.songoda.ultimatestacker.entity;
|
||||
|
||||
import com.songoda.ultimatestacker.UltimateStacker;
|
||||
import com.songoda.ultimatestacker.utils.Methods;
|
||||
import com.songoda.ultimatestacker.utils.SettingsManager;
|
||||
import com.songoda.ultimatestacker.utils.ServerVersion;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
@ -27,7 +28,7 @@ public class EntityStack {
|
||||
Entity entity = getEntityByUniqueId(this.entity);
|
||||
if (entity == null) return;
|
||||
|
||||
entity.setCustomNameVisible(true);
|
||||
entity.setCustomNameVisible(!SettingsManager.Settings.HOLOGRAMS_ON_LOOK_ENTITY.getBoolean());
|
||||
entity.setCustomName(Methods.compileEntityName(entity, amount));
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class StackingTask extends BukkitRunnable {
|
||||
}
|
||||
|
||||
// Start stacking task.
|
||||
runTaskTimer(instance, 0, instance.getConfig().getInt("Main.Stack Search Tick Speed"));
|
||||
runTaskTimer(instance, 0, SettingsManager.Settings.STACK_SEARCH_TICK_SPEED.getInt());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,10 +76,10 @@ public class Methods {
|
||||
|
||||
EntityStack stack = stackManager.getStack(killed);
|
||||
|
||||
if (instance.getConfig().getBoolean("Entity.Kill Whole Stack On Death") && stack.getAmount() != 1) {
|
||||
if (SettingsManager.Settings.KILL_WHOLE_STACK_ON_DEATH.getBoolean() && stack.getAmount() != 1) {
|
||||
handleWholeStackDeath(killed, stack, items, droppedExp);
|
||||
} else if(instance.getConfig().getBoolean("Entity.Kill Whole Stack On Special Death Cause") && stack.getAmount() != 1) {
|
||||
List<String> reasons = instance.getConfig().getStringList("Entity.Special Death Cause");
|
||||
} else if(SettingsManager.Settings.KILL_WHOLE_STACK_ON_SPECIAL_DEATH.getBoolean() && stack.getAmount() != 1) {
|
||||
List<String> reasons = SettingsManager.Settings.SPECIAL_DEATH_CAUSE.getStringList();
|
||||
EntityDamageEvent lastDamageCause = killed.getLastDamageCause();
|
||||
|
||||
if(lastDamageCause != null) {
|
||||
|
@ -181,12 +181,13 @@ public class SettingsManager implements Listener {
|
||||
STACK_ITEMS("Main.Stack Items", true),
|
||||
STACK_ENTITIES("Main.Stack Entities", true),
|
||||
STACK_SPAWNERS("Main.Stack Spawners", true),
|
||||
o3("Main.Stack Search Tick Speed", 5),
|
||||
STACK_SEARCH_TICK_SPEED("Main.Stack Search Tick Speed", 5),
|
||||
DISABLED_WORLDS("Main.DISABLED Worlds", Arrays.asList("World1", "World2", "World3")),
|
||||
MAX_STACK_ENTITIES("Entity.Max Stack Size", 15),
|
||||
MIN_STACK_ENTITIES("Entity.Min Stack Amount", 5),
|
||||
o5("Entity.Kill Whole Stack On Death", false),
|
||||
o52("Entity.Kill Whole Stack On Special Death Cause", true),
|
||||
HOLOGRAMS_ON_LOOK_ENTITY("Entity.Only Show Holograms On Look", false),
|
||||
KILL_WHOLE_STACK_ON_DEATH("Entity.Kill Whole Stack On Death", false),
|
||||
KILL_WHOLE_STACK_ON_SPECIAL_DEATH("Entity.Kill Whole Stack On Special Death Cause", true),
|
||||
SPECIAL_DEATH_CAUSE("Entity.Special Death Cause", Arrays.asList("FALL", "DROWNING", "LAVA", "VOID")),
|
||||
NAME_FORMAT_ENTITY("Entity.Name Format", "&f{TYPE} &6{AMT}x"),
|
||||
SEARCH_RADIUS("Entity.Search Radius", 5),
|
||||
|
Loading…
Reference in New Issue
Block a user