9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-24 01:19:22 +00:00

Finished 1.0.0

This commit is contained in:
Auxilor
2020-12-08 21:01:17 +00:00
parent 512f5f9cde
commit 5f9809d483
4 changed files with 22 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ import java.nio.charset.StandardCharsets;
public abstract class UpdatingYamlConfig {
public YamlConfiguration config;
private File configFile;
public File configFile;
private final String name;
private final boolean removeUnused;

View File

@@ -23,6 +23,10 @@ public class DeathListeners implements Listener {
}
});
IllusionerManager.OPTIONS.getDrops().forEach(drop -> {
event.getVictim().getLocation().getWorld().dropItemNaturally(event.getVictim().getLocation(), drop);
});
event.getDeathEvent().setDroppedExp(IllusionerManager.OPTIONS.generateXp());
}
}

View File

@@ -66,6 +66,10 @@ public class IllusionerOptions {
gameplayOptions.reload();
drops = new HashSet<>();
ConfigManager.getConfig().config.getConfigurationSection("drops").getKeys(false).forEach(key -> {
ItemStack itemStack = ConfigManager.getConfig().getItemStack("drops." + key);
drops.add(itemStack);
});
}
public BarColor getColor() {

View File

@@ -61,6 +61,19 @@ spawn:
middle-block: BEACON
bottom-block: DIAMOND_BLOCK
drops:
# EXAMPLE DROP - SET YOUR OWN!
'1':
==: org.bukkit.inventory.ItemStack
v: 2584
type: NETHERITE_SWORD
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: ok
enchants:
ARROW_DAMAGE: 1
sounds:
# A sound is defined as follows:
# broadcast - Should the whole server hear this or just the player?