Added list and reload command and the Throw effect.
This commit is contained in:
parent
ad1b882842
commit
a857e5d407
|
@ -5,6 +5,7 @@ import co.aikar.commands.InvalidCommandArgument;
|
|||
import com.songoda.epicenchants.commands.EnchantCommand;
|
||||
import com.songoda.epicenchants.listeners.ArmorListener;
|
||||
import com.songoda.epicenchants.listeners.BookListener;
|
||||
import com.songoda.epicenchants.listeners.EntityListener;
|
||||
import com.songoda.epicenchants.listeners.PlayerListener;
|
||||
import com.songoda.epicenchants.managers.EnchantManager;
|
||||
import com.songoda.epicenchants.managers.FileManager;
|
||||
|
@ -19,6 +20,8 @@ import org.bukkit.Bukkit;
|
|||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -79,8 +82,12 @@ public class EpicEnchants extends JavaPlugin {
|
|||
this.commandManager = new BukkitCommandManager(this);
|
||||
|
||||
commandManager.registerDependency(EpicEnchants.class, "instance", this);
|
||||
|
||||
commandManager.getCommandCompletions().registerCompletion("enchants", c -> enchantManager.getEnchants().stream().map(Enchant::getIdentifier).collect(Collectors.toList()));
|
||||
commandManager.getCommandContexts().registerContext(Enchant.class, c -> enchantManager.getEnchant(c.popFirstArg()).orElseThrow(() -> new InvalidCommandArgument("No echant exists by that name")));
|
||||
commandManager.getCommandCompletions().registerCompletion("enchantFiles", c -> fileManager.getEnchantFiles().orElse(Collections.emptyList()).stream().map(File::getName).collect(Collectors.toList()));
|
||||
|
||||
commandManager.getCommandContexts().registerContext(Enchant.class, c -> enchantManager.getEnchant(c.popFirstArg()).orElseThrow(() -> new InvalidCommandArgument("No enchant exists by that name")));
|
||||
commandManager.getCommandContexts().registerContext(File.class, c -> fileManager.getEnchantFile(c.popFirstArg()).orElseThrow(() -> new InvalidCommandArgument("No EnchantFile exists by that name")));
|
||||
|
||||
commandManager.registerCommand(new EnchantCommand());
|
||||
}
|
||||
|
@ -91,6 +98,7 @@ public class EpicEnchants extends JavaPlugin {
|
|||
add(new BookListener(instance));
|
||||
add(new ArmorListener());
|
||||
add(new PlayerListener(instance));
|
||||
add(new EntityListener(instance));
|
||||
}}.forEach(listener -> Bukkit.getPluginManager().registerEvents(listener, this));
|
||||
}
|
||||
|
||||
|
@ -104,4 +112,9 @@ public class EpicEnchants extends JavaPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
reloadConfig();
|
||||
locale.reloadMessages();
|
||||
fileManager.loadEnchants();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,9 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@CommandAlias("epicenchants|ee")
|
||||
public class EnchantCommand extends BaseCommand {
|
||||
|
||||
|
@ -30,8 +33,8 @@ public class EnchantCommand extends BaseCommand {
|
|||
@CommandPermission("epicenchants.give")
|
||||
public void onGiveBook(CommandSender sender, @Flags("other") Player target, Enchant enchant, @Optional Integer level, @Optional Integer successRate, @Optional Integer destroyRate) {
|
||||
target.getInventory().addItem(enchant.getBookItem().get(enchant, level, successRate, destroyRate));
|
||||
target.sendMessage(instance.getLocale().getMessageWithPrefix("command.given", enchant.getIdentifier()));
|
||||
sender.sendMessage(instance.getLocale().getMessageWithPrefix("command.gave", target.getName(), enchant.getIdentifier()));
|
||||
target.sendMessage(instance.getLocale().getMessageWithPrefix("command.book.given", enchant.getIdentifier()));
|
||||
sender.sendMessage(instance.getLocale().getMessageWithPrefix("command.book.gave", target.getName(), enchant.getIdentifier()));
|
||||
}
|
||||
|
||||
//ee apply {enchant} {tier}
|
||||
|
@ -64,4 +67,31 @@ public class EnchantCommand extends BaseCommand {
|
|||
player.sendMessage(instance.getLocale().getMessageWithPrefix(messageKey, enchant.getIdentifier()));
|
||||
player.getInventory().setItem(slot, result.getLeft());
|
||||
}
|
||||
|
||||
//ee list
|
||||
@Subcommand("list")
|
||||
@CommandPermission("epicenchants.list")
|
||||
@Description("List all enchants with their effects")
|
||||
public void onList(Player player) {
|
||||
instance.getEnchantManager().getEnchants().forEach(enchant ->
|
||||
player.sendMessage(instance.getLocale().getMessageWithPrefix("command.list", enchant.getIdentifier(),
|
||||
enchant.getEffectExecutors().stream().map(s -> s.getClass().getSimpleName()).collect(Collectors.joining(", ")))));
|
||||
}
|
||||
|
||||
//ee reload [enchantFileName]
|
||||
@Subcommand("reload")
|
||||
@CommandAlias("load")
|
||||
@Description("Reload all config files, or reload/load specific enchant files")
|
||||
@CommandCompletion("@enchantFiles")
|
||||
public void onReload(Player player, @Optional File fileName) {
|
||||
if (fileName == null) {
|
||||
instance.reload();
|
||||
player.sendMessage(instance.getLocale().getMessageWithPrefix("command.reload"));
|
||||
return;
|
||||
}
|
||||
|
||||
instance.getFileManager().loadEnchant(fileName);
|
||||
player.sendMessage(instance.getLocale().getMessageWithPrefix("command.filereload", fileName.getName()));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package com.songoda.epicenchants.effect.effects;
|
||||
|
||||
import com.songoda.epicenchants.effect.EffectExecutor;
|
||||
import com.songoda.epicenchants.enums.EventType;
|
||||
import com.songoda.epicenchants.objects.LeveledModifier;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import static com.songoda.epicenchants.effect.EffectExecutor.Who.WEARER;
|
||||
|
||||
public class Throw extends EffectExecutor {
|
||||
public Throw(ConfigurationSection section) {
|
||||
super(section);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Player wearer, Player opponent, int level, EventType eventType) {
|
||||
if (!getSection().isString("direction") || !getSection().isString("magnitude")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (who() == Who.OPPONENT && opponent == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Vector vector;
|
||||
double magnitude = LeveledModifier.of(getSection().getString("magnitude")).get(level, 0.1);
|
||||
Player player = who() == WEARER ? wearer : opponent;
|
||||
|
||||
switch (getSection().getString("direction").toLowerCase()) {
|
||||
case "up":
|
||||
vector = new Vector(0, magnitude, 0);
|
||||
break;
|
||||
case "down":
|
||||
vector = new Vector(0, -magnitude, 0);
|
||||
break;
|
||||
case "backward":
|
||||
vector = player.getLocation().getDirection().multiply(-magnitude);
|
||||
break;
|
||||
case "forward":
|
||||
vector = player.getLocation().getDirection().multiply(magnitude);
|
||||
break;
|
||||
default:
|
||||
vector = new Vector();
|
||||
}
|
||||
|
||||
if (vector.length() != 0)
|
||||
player.setVelocity(vector);
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ public final class ArmorEquipEvent extends PlayerEvent implements Cancellable {
|
|||
*
|
||||
* @return A list of handlers handling this event.
|
||||
*/
|
||||
public final static HandlerList getHandlerList() {
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,11 @@ import org.bukkit.inventory.ItemStack;
|
|||
@Getter
|
||||
public class EnchantApplyEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private ItemStack toEnchant;
|
||||
private Enchant enchant;
|
||||
private int level, successRate, destroyRate;
|
||||
private final ItemStack toEnchant;
|
||||
private final Enchant enchant;
|
||||
private final int level;
|
||||
private final int successRate;
|
||||
private final int destroyRate;
|
||||
private boolean cancelled = false;
|
||||
|
||||
public EnchantApplyEvent(ItemStack toEnchant, Enchant enchant, int level, int successRate, int destroyRate) {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ArmorListener implements Listener {
|
|||
if (e.getRawSlot() == newArmorType.getSlot()) {
|
||||
equipping = false;
|
||||
}
|
||||
if (newArmorType.equals(ArmorType.HELMET) && (equipping == isAirOrNull(e.getWhoClicked().getInventory().getHelmet())) || newArmorType.equals(ArmorType.CHESTPLATE) && (equipping ? isAirOrNull(e.getWhoClicked().getInventory().getChestplate()) : !isAirOrNull(e.getWhoClicked().getInventory().getChestplate())) || newArmorType.equals(ArmorType.LEGGINGS) && (equipping ? isAirOrNull(e.getWhoClicked().getInventory().getLeggings()) : !isAirOrNull(e.getWhoClicked().getInventory().getLeggings())) || newArmorType.equals(ArmorType.BOOTS) && (equipping ? isAirOrNull(e.getWhoClicked().getInventory().getBoots()) : !isAirOrNull(e.getWhoClicked().getInventory().getBoots()))) {
|
||||
if (newArmorType.equals(ArmorType.HELMET) && (equipping == isAirOrNull(e.getWhoClicked().getInventory().getHelmet())) || newArmorType.equals(ArmorType.CHESTPLATE) && (equipping == isAirOrNull(e.getWhoClicked().getInventory().getChestplate())) || newArmorType.equals(ArmorType.LEGGINGS) && (equipping == isAirOrNull(e.getWhoClicked().getInventory().getLeggings())) || newArmorType.equals(ArmorType.BOOTS) && (equipping == isAirOrNull(e.getWhoClicked().getInventory().getBoots()))) {
|
||||
ArmorEquipEvent armorEquipEvent = new ArmorEquipEvent((Player) e.getWhoClicked(), EquipMethod.SHIFT_CLICK, newArmorType, equipping ? null : e.getCurrentItem(), equipping ? e.getCurrentItem() : null);
|
||||
Bukkit.getServer().getPluginManager().callEvent(armorEquipEvent);
|
||||
if (armorEquipEvent.isCancelled()) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
public class EnchantManager {
|
||||
private Map<String, Enchant> enchantMap;
|
||||
private final Map<String, Enchant> enchantMap;
|
||||
|
||||
public EnchantManager() {
|
||||
this.enchantMap = new HashMap<>();
|
||||
|
|
|
@ -9,9 +9,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import static com.songoda.epicenchants.utils.parser.ConfigParser.parseEnchant;
|
||||
import static java.io.File.separator;
|
||||
|
@ -55,19 +53,35 @@ public class FileManager {
|
|||
}
|
||||
|
||||
public void loadEnchants() {
|
||||
File dir = new File(instance.getDataFolder() + separator + "enchants" + separator);
|
||||
Arrays.stream(dir.listFiles((dir1, filename) -> filename.endsWith(".yml"))).forEach(file -> {
|
||||
try {
|
||||
instance.getEnchantManager().addEnchant(parseEnchant(YamlConfiguration.loadConfiguration(file)));
|
||||
} catch (Exception e) {
|
||||
Bukkit.getConsoleSender().sendMessage("Something went wrong loading the enchant from file " + file.getName());
|
||||
Bukkit.getConsoleSender().sendMessage("Please check to make sure there are no errors in the file.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
getEnchantFiles().ifPresent(list -> list.forEach(this::loadEnchant));
|
||||
}
|
||||
|
||||
public FileConfiguration getConfiguration(String key) {
|
||||
return configurationMap.get(key);
|
||||
}
|
||||
|
||||
public void loadEnchant(File file) {
|
||||
try {
|
||||
instance.getEnchantManager().addEnchant(parseEnchant(YamlConfiguration.loadConfiguration(file)));
|
||||
} catch (Exception e) {
|
||||
Bukkit.getConsoleSender().sendMessage("Something went wrong loading the enchant from file " + file.getName());
|
||||
Bukkit.getConsoleSender().sendMessage("Please check to make sure there are no errors in the file.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public Optional<File> getEnchantFile(String path) {
|
||||
File file = new File(instance.getDataFolder() + separator + "enchants" + separator + path);
|
||||
return file.exists() ? Optional.of(file) : Optional.empty();
|
||||
}
|
||||
|
||||
public Optional<List<File>> getEnchantFiles() {
|
||||
File dir = new File(instance.getDataFolder() + separator + "enchants" + separator);
|
||||
File[] files = dir.listFiles((dir1, filename) -> filename.endsWith(".yml"));
|
||||
|
||||
if (files != null)
|
||||
return Optional.of(Arrays.asList(files));
|
||||
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.songoda.epicenchants.enums.EventType;
|
|||
import com.songoda.epicenchants.wrappers.MobWrapper;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Singular;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
|
@ -18,10 +19,10 @@ public class Enchant {
|
|||
private String identifier;
|
||||
private int tier;
|
||||
private int maxLevel;
|
||||
private Set<String> conflict;
|
||||
private Set<Material> itemWhitelist;
|
||||
private Set<EffectExecutor> effectExecutors;
|
||||
private Set<MobWrapper> mobs;
|
||||
@Singular("conflict") private Set<String> conflict;
|
||||
@Singular("whiteItem") private Set<Material> itemWhitelist;
|
||||
@Singular("effect") private Set<EffectExecutor> effectExecutors;
|
||||
@Singular("mob") private Set<MobWrapper> mobs;
|
||||
private String format;
|
||||
private BookItem bookItem;
|
||||
private LeveledModifier modifyDamage;
|
||||
|
|
|
@ -7,7 +7,7 @@ import javax.script.ScriptEngineManager;
|
|||
import javax.script.ScriptException;
|
||||
|
||||
public class LeveledModifier {
|
||||
private String string;
|
||||
private final String string;
|
||||
|
||||
private LeveledModifier(String string) {
|
||||
this.string = string;
|
||||
|
@ -17,7 +17,7 @@ public class LeveledModifier {
|
|||
return new LeveledModifier(string);
|
||||
}
|
||||
|
||||
public double get(int level, int def) {
|
||||
public double get(int level, double def) {
|
||||
if (string == null || string.isEmpty()) {
|
||||
return def;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class EnchantUtils {
|
|||
return GeneralUtils.chance(destroyRate) ? Pair.of(new ItemStack(Material.AIR), BROKEN_FAILURE) : Pair.of(itemStack, FAILURE);
|
||||
}
|
||||
|
||||
if (getEnchants(itemStack).keySet().stream().anyMatch(s -> enchant.getIdentifier().equalsIgnoreCase(s.getIdentifier()))) {
|
||||
if (getEnchants(itemStack).keySet().stream().anyMatch(s -> enchant.getConflict().contains(s.getIdentifier()))) {
|
||||
return Pair.of(itemStack, CONFLICT);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ public class FastInv implements InventoryHolder {
|
|||
|
||||
private static Plugin plugin = null;
|
||||
private boolean cancelTasksOnClose = true;
|
||||
private Set<FastInvClickListener> clickListeners = new HashSet<>();
|
||||
private Set<FastInvCloseListener> closeListeners = new HashSet<>();
|
||||
private final Set<FastInvClickListener> clickListeners = new HashSet<>();
|
||||
private final Set<FastInvCloseListener> closeListeners = new HashSet<>();
|
||||
private Inventory inventory;
|
||||
private Map<Integer, FastInvClickListener> itemListeners = new HashMap<>();
|
||||
private Set<BukkitTask> tasks = new HashSet<>();
|
||||
private final Map<Integer, FastInvClickListener> itemListeners = new HashMap<>();
|
||||
private final Set<BukkitTask> tasks = new HashSet<>();
|
||||
|
||||
/**
|
||||
* Create a new FastInv with a custom size.
|
||||
|
@ -422,8 +422,8 @@ public class FastInv implements InventoryHolder {
|
|||
public static abstract class FastInvEvent {
|
||||
|
||||
private boolean cancelled;
|
||||
private FastInv inventory;
|
||||
private Player player;
|
||||
private final FastInv inventory;
|
||||
private final Player player;
|
||||
|
||||
FastInvEvent(Player player, FastInv inventory, boolean cancelled) {
|
||||
this.player = player;
|
||||
|
@ -470,10 +470,10 @@ public class FastInv implements InventoryHolder {
|
|||
|
||||
public static class FastInvClickEvent extends FastInvEvent {
|
||||
|
||||
private InventoryAction action;
|
||||
private ClickType clickType;
|
||||
private ItemStack item;
|
||||
private int slot;
|
||||
private final InventoryAction action;
|
||||
private final ClickType clickType;
|
||||
private final ItemStack item;
|
||||
private final int slot;
|
||||
|
||||
private FastInvClickEvent(Player player, FastInv inventory, int slot, ItemStack item,
|
||||
boolean cancelled, InventoryAction action, ClickType clickType) {
|
||||
|
|
|
@ -18,7 +18,7 @@ public class ItemBuilder {
|
|||
|
||||
private final ItemStack item;
|
||||
private ItemMeta meta;
|
||||
private Set<EnchantmentWrapper> enchantmentWrappers;
|
||||
private final Set<EnchantmentWrapper> enchantmentWrappers;
|
||||
|
||||
/*
|
||||
* Constructors:
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package com.songoda.epicenchants.utils;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.bukkit.Material.*;
|
||||
import static org.bukkit.Material.valueOf;
|
||||
|
||||
public class VersionDependent {
|
||||
private static Set<Material> blacklistLegacy;
|
||||
private static Set<Material> blacklist;
|
||||
private static int version;
|
||||
|
||||
public static void initLegacy(int serverVersion) {
|
||||
version = serverVersion;
|
||||
blacklistLegacy = new HashSet<Material>() {
|
||||
blacklist = new HashSet<Material>() {
|
||||
{
|
||||
add(valueOf("FURNACE"));
|
||||
add(valueOf("CHEST"));
|
||||
|
@ -172,50 +170,7 @@ public class VersionDependent {
|
|||
}
|
||||
|
||||
public static Set<Material> getBlackList() {
|
||||
return !blacklist.isEmpty() ? blacklist : !blacklistLegacy.isEmpty() ? blacklistLegacy : null;
|
||||
}
|
||||
|
||||
public static ItemStack getStainedGlassPane(int data) {
|
||||
if (version >= 13) {
|
||||
switch (data) {
|
||||
case 0:
|
||||
return new ItemStack(WHITE_STAINED_GLASS_PANE);
|
||||
case 1:
|
||||
return new ItemStack(ORANGE_STAINED_GLASS_PANE);
|
||||
case 2:
|
||||
return new ItemStack(MAGENTA_STAINED_GLASS_PANE);
|
||||
case 3:
|
||||
return new ItemStack(LIGHT_BLUE_STAINED_GLASS_PANE);
|
||||
case 4:
|
||||
return new ItemStack(YELLOW_STAINED_GLASS_PANE);
|
||||
case 5:
|
||||
return new ItemStack(LIME_STAINED_GLASS_PANE);
|
||||
case 6:
|
||||
return new ItemStack(PINK_STAINED_GLASS);
|
||||
case 7:
|
||||
return new ItemStack(GRAY_STAINED_GLASS_PANE);
|
||||
case 8:
|
||||
return new ItemStack(LIGHT_GRAY_STAINED_GLASS_PANE);
|
||||
case 9:
|
||||
return new ItemStack(CYAN_STAINED_GLASS_PANE);
|
||||
case 10:
|
||||
return new ItemStack(PURPLE_STAINED_GLASS_PANE);
|
||||
case 11:
|
||||
return new ItemStack(BLUE_STAINED_GLASS_PANE);
|
||||
case 12:
|
||||
return new ItemStack(BROWN_STAINED_GLASS_PANE);
|
||||
case 13:
|
||||
return new ItemStack(GREEN_STAINED_GLASS_PANE);
|
||||
case 14:
|
||||
return new ItemStack(RED_STAINED_GLASS_PANE);
|
||||
case 15:
|
||||
return new ItemStack(BLACK_STAINED_GLASS_PANE);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return new ItemStack(Material.valueOf("STAINED_GLASS_PANE"), 1, (short) data);
|
||||
return blacklist;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -31,17 +32,17 @@ public class ConfigParser {
|
|||
.bookItem(parseBookItem(config.getConfigurationSection("book-item")))
|
||||
.itemWhitelist(config.getStringList("item-whitelist").stream().map(Material::valueOf).collect(Collectors.toSet()))
|
||||
.conflict(new HashSet<>(config.getStringList("conflicting-enchants")))
|
||||
.mobs(config.getConfigurationSection("mobs").getKeys(false).stream()
|
||||
.mobs(config.isConfigurationSection("mobs") ? config.getConfigurationSection("mobs").getKeys(false).stream()
|
||||
.map(s -> "mobs." + s)
|
||||
.map(config::getConfigurationSection)
|
||||
.map(ConfigParser::parseMobWrapper).collect(Collectors.toSet()))
|
||||
.effectExecutors(config.getConfigurationSection("effects").getKeys(false).stream()
|
||||
.map(ConfigParser::parseMobWrapper).collect(Collectors.toSet()) : Collections.emptySet())
|
||||
.effectExecutors(config.isConfigurationSection("effects") ? config.getConfigurationSection("effects").getKeys(false).stream()
|
||||
.map(s -> "effects." + s)
|
||||
.map(config::getConfigurationSection)
|
||||
.map(EffectManager::getEffect)
|
||||
.map(o -> o.orElse(null))
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toSet()))
|
||||
.collect(Collectors.toSet()) : Collections.emptySet())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,5 @@ public class MobWrapper {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ rows: 1
|
|||
|
||||
contents:
|
||||
1:
|
||||
material: "BOOK"
|
||||
material: "PAPER"
|
||||
display-name: "&cClick to purchase random book"
|
||||
data: 7
|
||||
tier: 1
|
||||
|
|
|
@ -6,6 +6,9 @@ general.nametag.prefix= "&8[&6EpicEnchants&8]"
|
|||
|
||||
command.book.give= "&7You have been given a &6tier {tier} &7Book."
|
||||
command.book.gave= "&7You gave {player} a &6tier {tier} &7Book."
|
||||
command.list= "&6{enchant} &7- {effects}"
|
||||
command.reload= "&6Configuration files reload"
|
||||
command.filereload= "&6{file} has been reloaded&7, please check console for potential errors."
|
||||
|
||||
#Event Messages
|
||||
|
||||
|
|
Loading…
Reference in New Issue