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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user