mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2025-01-07 07:47:41 +01:00
Add a dedicated config file for messages
This commit is contained in:
parent
eb2ecbcabd
commit
4e1a336661
@ -1,5 +1,51 @@
|
||||
package de.epiceric.shopchest;
|
||||
|
||||
import com.palmergames.bukkit.towny.Towny;
|
||||
import com.wasteofplastic.askyblock.ASkyBlock;
|
||||
import de.epiceric.shopchest.command.ShopCommand;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.hologram.HologramFormat;
|
||||
import de.epiceric.shopchest.event.ShopInitializedEvent;
|
||||
import de.epiceric.shopchest.external.BentoBoxShopFlag;
|
||||
import de.epiceric.shopchest.external.PlotSquaredOldShopFlag;
|
||||
import de.epiceric.shopchest.external.PlotSquaredShopFlag;
|
||||
import de.epiceric.shopchest.external.WorldGuardShopFlag;
|
||||
import de.epiceric.shopchest.external.listeners.*;
|
||||
import de.epiceric.shopchest.language.LanguageLoader;
|
||||
import de.epiceric.shopchest.language.LanguageManager;
|
||||
import de.epiceric.shopchest.listeners.BentoBoxListener;
|
||||
import de.epiceric.shopchest.listeners.WorldGuardListener;
|
||||
import de.epiceric.shopchest.listeners.*;
|
||||
import de.epiceric.shopchest.nms.Platform;
|
||||
import de.epiceric.shopchest.nms.PlatformLoader;
|
||||
import de.epiceric.shopchest.nms.reflection.ShopChestDebug;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
import de.epiceric.shopchest.sql.Database;
|
||||
import de.epiceric.shopchest.sql.MySQL;
|
||||
import de.epiceric.shopchest.sql.SQLite;
|
||||
import de.epiceric.shopchest.utils.*;
|
||||
import de.epiceric.shopchest.utils.UpdateChecker.UpdateCheckerResult;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import me.wiefferink.areashop.AreaShop;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.AdvancedPie;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.codemc.worldguardwrapper.WorldGuardWrapper;
|
||||
import pl.islandworld.IslandWorld;
|
||||
import us.talabrek.ultimateskyblock.api.uSkyBlockAPI;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
@ -15,77 +61,13 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.palmergames.bukkit.towny.Towny;
|
||||
import com.wasteofplastic.askyblock.ASkyBlock;
|
||||
|
||||
import de.epiceric.shopchest.nms.Platform;
|
||||
import de.epiceric.shopchest.nms.PlatformLoader;
|
||||
import de.epiceric.shopchest.nms.reflection.ShopChestDebug;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.AdvancedPie;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.codemc.worldguardwrapper.WorldGuardWrapper;
|
||||
|
||||
import de.epiceric.shopchest.command.ShopCommand;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.hologram.HologramFormat;
|
||||
import de.epiceric.shopchest.event.ShopInitializedEvent;
|
||||
import de.epiceric.shopchest.external.BentoBoxShopFlag;
|
||||
import de.epiceric.shopchest.external.PlotSquaredOldShopFlag;
|
||||
import de.epiceric.shopchest.external.PlotSquaredShopFlag;
|
||||
import de.epiceric.shopchest.external.WorldGuardShopFlag;
|
||||
import de.epiceric.shopchest.external.listeners.ASkyBlockListener;
|
||||
import de.epiceric.shopchest.external.listeners.GriefPreventionListener;
|
||||
import de.epiceric.shopchest.external.listeners.IslandWorldListener;
|
||||
import de.epiceric.shopchest.external.listeners.PlotSquaredListener;
|
||||
import de.epiceric.shopchest.external.listeners.TownyListener;
|
||||
import de.epiceric.shopchest.external.listeners.USkyBlockListener;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.listeners.AreaShopListener;
|
||||
import de.epiceric.shopchest.listeners.BentoBoxListener;
|
||||
import de.epiceric.shopchest.listeners.BlockExplodeListener;
|
||||
import de.epiceric.shopchest.listeners.ChestProtectListener;
|
||||
import de.epiceric.shopchest.listeners.CreativeModeListener;
|
||||
import de.epiceric.shopchest.listeners.NotifyPlayerOnJoinListener;
|
||||
import de.epiceric.shopchest.listeners.ShopInteractListener;
|
||||
import de.epiceric.shopchest.listeners.ShopItemListener;
|
||||
import de.epiceric.shopchest.listeners.ShopUpdateListener;
|
||||
import de.epiceric.shopchest.listeners.WorldGuardListener;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
import de.epiceric.shopchest.sql.Database;
|
||||
import de.epiceric.shopchest.sql.MySQL;
|
||||
import de.epiceric.shopchest.sql.SQLite;
|
||||
import de.epiceric.shopchest.utils.Callback;
|
||||
import de.epiceric.shopchest.utils.ClickType;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
import de.epiceric.shopchest.utils.ShopUpdater;
|
||||
import de.epiceric.shopchest.utils.ShopUtils;
|
||||
import de.epiceric.shopchest.utils.UpdateChecker;
|
||||
import de.epiceric.shopchest.utils.UpdateChecker.UpdateCheckerResult;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import me.wiefferink.areashop.AreaShop;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import pl.islandworld.IslandWorld;
|
||||
import us.talabrek.ultimateskyblock.api.uSkyBlockAPI;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
|
||||
public class ShopChest extends JavaPlugin {
|
||||
|
||||
private static ShopChest instance;
|
||||
|
||||
private Config config;
|
||||
private Platform platform;
|
||||
private LanguageManager languageManager;
|
||||
private HologramFormat hologramFormat;
|
||||
private ShopCommand shopCommand;
|
||||
private Economy econ = null;
|
||||
@ -191,7 +173,6 @@ public class ShopChest extends JavaPlugin {
|
||||
|
||||
shopUtils = new ShopUtils(this);
|
||||
saveResource("item_names.txt", true);
|
||||
LanguageUtils.load();
|
||||
|
||||
File hologramFormatFile = new File(getDataFolder(), "hologram-format.yml");
|
||||
if (!hologramFormatFile.exists()) {
|
||||
@ -272,6 +253,14 @@ public class ShopChest extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load every language files. It needs to be called after the initialization of the configuration
|
||||
*/
|
||||
public void loadLanguages() {
|
||||
final LanguageLoader languageLoader = new LanguageLoader();
|
||||
languageManager = languageLoader.loadLanguageManager(this, Config.languageFile);
|
||||
}
|
||||
|
||||
private void loadExternalPlugins() {
|
||||
Plugin townyPlugin = Bukkit.getServer().getPluginManager().getPlugin("Towny");
|
||||
if (townyPlugin instanceof Towny) {
|
||||
@ -557,6 +546,10 @@ public class ShopChest extends JavaPlugin {
|
||||
return platform;
|
||||
}
|
||||
|
||||
public LanguageManager getLanguageManager() {
|
||||
return languageManager;
|
||||
}
|
||||
|
||||
public HologramFormat getHologramFormat() {
|
||||
return hologramFormat;
|
||||
}
|
||||
|
@ -1,5 +1,20 @@
|
||||
package de.epiceric.shopchest.command;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.utils.ClickType.SelectClickType;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.*;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@ -8,28 +23,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.command.SimpleCommandMap;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.utils.ClickType.SelectClickType;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
|
||||
public class ShopCommand {
|
||||
|
||||
private static boolean commandCreated = false;
|
||||
@ -73,10 +66,12 @@ public class ShopCommand {
|
||||
}
|
||||
}
|
||||
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
if (sender.hasPermission(Permissions.CREATE_ADMIN)) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_CREATE_ADMIN, cmdReplacement);
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_CREATE_ADMIN, cmdReplacement);
|
||||
} else if (receiveCreateMessage) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_CREATE, cmdReplacement);
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_CREATE, cmdReplacement);
|
||||
}
|
||||
|
||||
return "";
|
||||
@ -86,28 +81,32 @@ public class ShopCommand {
|
||||
addSubCommand(new ShopSubCommand("remove", true, executor, tabCompleter) {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_REMOVE, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_REMOVE, cmdReplacement);
|
||||
}
|
||||
});
|
||||
|
||||
addSubCommand(new ShopSubCommand("info", true, executor, tabCompleter) {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_INFO, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_INFO, cmdReplacement);
|
||||
}
|
||||
});
|
||||
|
||||
addSubCommand(new ShopSubCommand("limits", true, executor, tabCompleter) {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_LIMITS, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_LIMITS, cmdReplacement);
|
||||
}
|
||||
});
|
||||
|
||||
addSubCommand(new ShopSubCommand("open", true, executor, tabCompleter) {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_OPEN, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_OPEN, cmdReplacement);
|
||||
}
|
||||
});
|
||||
|
||||
@ -115,7 +114,8 @@ public class ShopCommand {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
if (sender.hasPermission(Permissions.REMOVE_OTHER)) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_REMOVEALL, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_REMOVEALL, cmdReplacement);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
@ -126,7 +126,8 @@ public class ShopCommand {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
if (sender.hasPermission(Permissions.RELOAD)) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_RELOAD, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_RELOAD, cmdReplacement);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
@ -137,7 +138,8 @@ public class ShopCommand {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
if (sender.hasPermission(Permissions.UPDATE)) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_UPDATE, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_UPDATE, cmdReplacement);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
@ -148,7 +150,8 @@ public class ShopCommand {
|
||||
@Override
|
||||
public String getHelpMessage(CommandSender sender) {
|
||||
if (sender.hasPermission(Permissions.CONFIG)) {
|
||||
return LanguageUtils.getMessage(Message.COMMAND_DESC_CONFIG, cmdReplacement);
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
return messageRegistry.getMessage(Message.COMMAND_DESC_CONFIG, cmdReplacement);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
@ -264,8 +267,10 @@ public class ShopCommand {
|
||||
private void sendBasicHelpMessage(CommandSender sender) {
|
||||
plugin.debug("Sending basic help message to " + sender.getName());
|
||||
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
sender.sendMessage(" ");
|
||||
String header = LanguageUtils.getMessage(Message.COMMAND_DESC_HEADER,
|
||||
String header = messageRegistry.getMessage(Message.COMMAND_DESC_HEADER,
|
||||
new Replacement(Placeholder.COMMAND, Config.mainCommandName));
|
||||
|
||||
if (!header.trim().isEmpty()) sender.sendMessage(header);
|
||||
@ -279,8 +284,8 @@ public class ShopCommand {
|
||||
sender.sendMessage(msg);
|
||||
}
|
||||
|
||||
String footer = LanguageUtils.getMessage(Message.COMMAND_DESC_FOOTER,
|
||||
new Replacement(Placeholder.COMMAND,Config.mainCommandName));
|
||||
String footer = messageRegistry.getMessage(Message.COMMAND_DESC_FOOTER,
|
||||
new Replacement(Placeholder.COMMAND, Config.mainCommandName));
|
||||
|
||||
if (!footer.trim().isEmpty()) sender.sendMessage(footer);
|
||||
sender.sendMessage(" ");
|
||||
|
@ -1,15 +1,19 @@
|
||||
package de.epiceric.shopchest.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.event.*;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
import de.epiceric.shopchest.shop.ShopProduct;
|
||||
import de.epiceric.shopchest.utils.*;
|
||||
import de.epiceric.shopchest.utils.ClickType.CreateClickType;
|
||||
import de.epiceric.shopchest.utils.ClickType.SelectClickType;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -17,30 +21,10 @@ import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.event.ShopPreCreateEvent;
|
||||
import de.epiceric.shopchest.event.ShopPreInfoEvent;
|
||||
import de.epiceric.shopchest.event.ShopPreOpenEvent;
|
||||
import de.epiceric.shopchest.event.ShopPreRemoveEvent;
|
||||
import de.epiceric.shopchest.event.ShopReloadEvent;
|
||||
import de.epiceric.shopchest.event.ShopRemoveAllEvent;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
import de.epiceric.shopchest.shop.ShopProduct;
|
||||
import de.epiceric.shopchest.utils.Callback;
|
||||
import de.epiceric.shopchest.utils.ClickType;
|
||||
import de.epiceric.shopchest.utils.ClickType.CreateClickType;
|
||||
import de.epiceric.shopchest.utils.ClickType.SelectClickType;
|
||||
import de.epiceric.shopchest.utils.ItemUtils;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
import de.epiceric.shopchest.utils.ShopUtils;
|
||||
import de.epiceric.shopchest.utils.UpdateChecker;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
@ -54,6 +38,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String s, String[] args) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
List<ShopSubCommand> subCommands = plugin.getShopCommand().getSubCommands();
|
||||
|
||||
if (args.length > 0) {
|
||||
@ -75,19 +60,19 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (sender.hasPermission(Permissions.RELOAD)) {
|
||||
reload(sender);
|
||||
} else {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_RELOAD));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_RELOAD));
|
||||
}
|
||||
} else if (subCommand.getName().equalsIgnoreCase("update")) {
|
||||
if (sender.hasPermission(Permissions.UPDATE)) {
|
||||
checkUpdates(sender);
|
||||
} else {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_UPDATE));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_UPDATE));
|
||||
}
|
||||
} else if (subCommand.getName().equalsIgnoreCase("config")) {
|
||||
if (sender.hasPermission(Permissions.CONFIG)) {
|
||||
return args.length >= 4 && changeConfig(sender, args);
|
||||
} else {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_CONFIG));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_CONFIG));
|
||||
}
|
||||
} else if (subCommand.getName().equalsIgnoreCase("removeall")) {
|
||||
if (sender.hasPermission(Permissions.REMOVE_OTHER)) {
|
||||
@ -97,7 +82,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_REMOVE_OTHERS));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_REMOVE_OTHERS));
|
||||
}
|
||||
} else {
|
||||
if (sender instanceof Player) {
|
||||
@ -113,7 +98,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (p.hasPermission(Permissions.CREATE_ADMIN)) {
|
||||
create(args, Shop.ShopType.ADMIN, p);
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_CREATE_ADMIN));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_CREATE_ADMIN));
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@ -128,7 +113,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
} else if (subCommand.getName().equalsIgnoreCase("limits")) {
|
||||
plugin.debug(p.getName() + " is viewing his shop limits: " + shopUtils.getShopAmount(p) + "/" + shopUtils.getShopLimit(p));
|
||||
int limit = shopUtils.getShopLimit(p);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.OCCUPIED_SHOP_SLOTS,
|
||||
p.sendMessage(messageRegistry.getMessage(Message.OCCUPIED_SHOP_SLOTS,
|
||||
new Replacement(Placeholder.LIMIT, (limit < 0 ? "∞" : String.valueOf(limit))),
|
||||
new Replacement(Placeholder.AMOUNT, String.valueOf(shopUtils.getShopAmount(p)))));
|
||||
} else if (subCommand.getName().equalsIgnoreCase("open")) {
|
||||
@ -150,9 +135,11 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* @param sender The command executor
|
||||
*/
|
||||
private void checkUpdates(CommandSender sender) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(sender.getName() + " is checking for updates");
|
||||
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.UPDATE_CHECKING));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.UPDATE_CHECKING));
|
||||
|
||||
UpdateChecker uc = new UpdateChecker(ShopChest.getInstance());
|
||||
UpdateChecker.UpdateCheckerResult result = uc.check();
|
||||
@ -165,19 +152,19 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (sender instanceof Player) {
|
||||
Utils.sendUpdateMessage(plugin, (Player) sender);
|
||||
} else {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.UPDATE_AVAILABLE, new Replacement(Placeholder.VERSION, uc.getVersion())));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.UPDATE_AVAILABLE, new Replacement(Placeholder.VERSION, uc.getVersion())));
|
||||
}
|
||||
|
||||
} else if (result == UpdateChecker.UpdateCheckerResult.FALSE) {
|
||||
plugin.setLatestVersion("");
|
||||
plugin.setDownloadLink("");
|
||||
plugin.setUpdateNeeded(false);
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.UPDATE_NO_UPDATE));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.UPDATE_NO_UPDATE));
|
||||
} else {
|
||||
plugin.setLatestVersion("");
|
||||
plugin.setDownloadLink("");
|
||||
plugin.setUpdateNeeded(false);
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.UPDATE_ERROR));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.UPDATE_ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,11 +173,13 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* @param sender The command executor
|
||||
*/
|
||||
private void reload(final CommandSender sender) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(sender.getName() + " is reloading the shops");
|
||||
|
||||
ShopReloadEvent event = new ShopReloadEvent(sender);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()){
|
||||
if (event.isCancelled()) {
|
||||
plugin.debug("Reload event cancelled");
|
||||
return;
|
||||
}
|
||||
@ -215,14 +204,14 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
shopUtils.loadShops(loadedChunks, new Callback<Integer>(plugin) {
|
||||
@Override
|
||||
public void onResult(Integer result) {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.RELOADED_SHOPS,
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.RELOADED_SHOPS,
|
||||
new Replacement(Placeholder.AMOUNT, String.valueOf(result))));
|
||||
plugin.debug(sender.getName() + " has reloaded " + result + " shops");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable throwable) {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED,
|
||||
new Replacement(Placeholder.ERROR, "Failed to load shops from database")));
|
||||
plugin.getLogger().severe("Failed to load shops");
|
||||
if (throwable != null) plugin.getLogger().severe(throwable.getMessage());
|
||||
@ -233,7 +222,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
@Override
|
||||
public void onError(Throwable throwable) {
|
||||
// Database connection probably failed => disable plugin to prevent more errors
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED,
|
||||
new Replacement(Placeholder.ERROR, "No database access: Disabling ShopChest")));
|
||||
plugin.getLogger().severe("No database access: Disabling ShopChest");
|
||||
if (throwable != null) plugin.getLogger().severe(throwable.getMessage());
|
||||
@ -249,6 +238,8 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* @param p The command executor
|
||||
*/
|
||||
private void create(String[] args, Shop.ShopType shopType, final Player p) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(p.getName() + " wants to create a shop");
|
||||
|
||||
int amount;
|
||||
@ -260,13 +251,13 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
buyPrice = Double.parseDouble(args[2]);
|
||||
sellPrice = Double.parseDouble(args[3]);
|
||||
} catch (NumberFormatException e) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.AMOUNT_PRICE_NOT_NUMBER));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.AMOUNT_PRICE_NOT_NUMBER));
|
||||
plugin.debug(p.getName() + " has entered an invalid amount and/or prices");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Utils.hasPermissionToCreateShop(p, Utils.getPreferredItemInHand(p), buyPrice > 0, sellPrice > 0)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_CREATE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_CREATE));
|
||||
plugin.debug(p.getName() + " is not permitted to create the shop");
|
||||
return;
|
||||
}
|
||||
@ -276,7 +267,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (limit != -1) {
|
||||
if (shopUtils.getShopAmount(p) >= limit) {
|
||||
if (shopType != Shop.ShopType.ADMIN) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SHOP_LIMIT_REACHED, new Replacement(Placeholder.LIMIT, String.valueOf(limit))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SHOP_LIMIT_REACHED, new Replacement(Placeholder.LIMIT, String.valueOf(limit))));
|
||||
plugin.debug(p.getName() + " has reached the limit");
|
||||
return;
|
||||
}
|
||||
@ -284,13 +275,13 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (amount <= 0) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.AMOUNT_IS_ZERO));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.AMOUNT_IS_ZERO));
|
||||
plugin.debug(p.getName() + " has entered an invalid amount");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Config.allowDecimalsInPrice && (buyPrice != (int) buyPrice || sellPrice != (int) sellPrice)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.PRICES_CONTAIN_DECIMALS));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.PRICES_CONTAIN_DECIMALS));
|
||||
plugin.debug(p.getName() + " has entered an invalid price");
|
||||
return;
|
||||
}
|
||||
@ -299,7 +290,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
boolean sellEnabled = sellPrice > 0;
|
||||
|
||||
if (!buyEnabled && !sellEnabled) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.BUY_SELL_DISABLED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.BUY_SELL_DISABLED));
|
||||
plugin.debug(p.getName() + " has disabled buying and selling");
|
||||
return;
|
||||
}
|
||||
@ -311,7 +302,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
plugin.debug(p.getName() + " does not have an item in his hand");
|
||||
|
||||
if (!Config.creativeSelectItem) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_ITEM_IN_HAND));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_ITEM_IN_HAND));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -321,7 +312,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
p.setGameMode(GameMode.CREATIVE);
|
||||
}
|
||||
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SELECT_ITEM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SELECT_ITEM));
|
||||
} else {
|
||||
SelectClickType ct = new SelectClickType(null, amount, buyPrice, sellPrice, shopType);
|
||||
ct.setItem(inHand);
|
||||
@ -333,6 +324,8 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* <b>SHALL ONLY BE CALLED VIA {@link ShopCommand#createShopAfterSelected(Player player, SelectClickType clickType)}</b>
|
||||
*/
|
||||
protected void create2(Player p, SelectClickType selectClickType) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
ItemStack itemStack = selectClickType.getItem();
|
||||
int amount = selectClickType.getAmount();
|
||||
double buyPrice = selectClickType.getBuyPrice();
|
||||
@ -352,7 +345,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (is.getType().equals(itemStack.getType()) && is.getDurability() == itemStack.getDurability()) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CANNOT_SELL_ITEM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CANNOT_SELL_ITEM));
|
||||
plugin.debug(p.getName() + "'s item is on the blacklist");
|
||||
return;
|
||||
}
|
||||
@ -372,7 +365,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (is.getType().equals(itemStack.getType()) && is.getDurability() == itemStack.getDurability()) {
|
||||
if (buyEnabled) {
|
||||
if ((buyPrice < amount * minPrice) && (buyPrice > 0)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.BUY_PRICE_TOO_LOW, new Replacement(Placeholder.MIN_PRICE, String.valueOf(amount * minPrice))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.BUY_PRICE_TOO_LOW, new Replacement(Placeholder.MIN_PRICE, String.valueOf(amount * minPrice))));
|
||||
plugin.debug(p.getName() + "'s buy price is lower than the minimum");
|
||||
return;
|
||||
}
|
||||
@ -380,7 +373,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
if (sellEnabled) {
|
||||
if ((sellPrice < amount * minPrice) && (sellPrice > 0)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SELL_PRICE_TOO_LOW, new Replacement(Placeholder.MIN_PRICE, String.valueOf(amount * minPrice))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SELL_PRICE_TOO_LOW, new Replacement(Placeholder.MIN_PRICE, String.valueOf(amount * minPrice))));
|
||||
plugin.debug(p.getName() + "'s sell price is lower than the minimum");
|
||||
return;
|
||||
}
|
||||
@ -402,7 +395,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (is.getType().equals(itemStack.getType()) && is.getDurability() == itemStack.getDurability()) {
|
||||
if (buyEnabled) {
|
||||
if ((buyPrice > amount * maxPrice) && (buyPrice > 0)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.BUY_PRICE_TOO_HIGH, new Replacement(Placeholder.MAX_PRICE, String.valueOf(amount * maxPrice))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.BUY_PRICE_TOO_HIGH, new Replacement(Placeholder.MAX_PRICE, String.valueOf(amount * maxPrice))));
|
||||
plugin.debug(p.getName() + "'s buy price is higher than the maximum");
|
||||
return;
|
||||
}
|
||||
@ -410,7 +403,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
if (sellEnabled) {
|
||||
if ((sellPrice > amount * maxPrice) && (sellPrice > 0)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SELL_PRICE_TOO_HIGH, new Replacement(Placeholder.MAX_PRICE, String.valueOf(amount * maxPrice))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SELL_PRICE_TOO_HIGH, new Replacement(Placeholder.MAX_PRICE, String.valueOf(amount * maxPrice))));
|
||||
plugin.debug(p.getName() + "'s sell price is higher than the maximum");
|
||||
return;
|
||||
}
|
||||
@ -422,7 +415,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (sellEnabled && buyEnabled) {
|
||||
if (Config.buyGreaterOrEqualSell) {
|
||||
if (buyPrice < sellPrice) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.BUY_PRICE_TOO_LOW, new Replacement(Placeholder.MIN_PRICE, String.valueOf(sellPrice))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.BUY_PRICE_TOO_LOW, new Replacement(Placeholder.MIN_PRICE, String.valueOf(sellPrice))));
|
||||
plugin.debug(p.getName() + "'s buy price is lower than the sell price");
|
||||
return;
|
||||
}
|
||||
@ -431,7 +424,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
if (Enchantment.DURABILITY.canEnchantItem(itemStack)) {
|
||||
if (itemStack.getDurability() > 0 && !Config.allowBrokenItems) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CANNOT_SELL_BROKEN_ITEM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CANNOT_SELL_BROKEN_ITEM));
|
||||
plugin.debug(p.getName() + "'s item is broken");
|
||||
return;
|
||||
}
|
||||
@ -440,7 +433,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
double creationPrice = (shopType == Shop.ShopType.NORMAL) ?Config.shopCreationPriceNormal :Config.shopCreationPriceAdmin;
|
||||
if (creationPrice > 0) {
|
||||
if (plugin.getEconomy().getBalance(p, p.getWorld().getName()) < creationPrice) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SHOP_CREATE_NOT_ENOUGH_MONEY, new Replacement(Placeholder.CREATION_PRICE, String.valueOf(creationPrice))));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SHOP_CREATE_NOT_ENOUGH_MONEY, new Replacement(Placeholder.CREATION_PRICE, String.valueOf(creationPrice))));
|
||||
plugin.debug(p.getName() + " can not pay the creation price");
|
||||
return;
|
||||
}
|
||||
@ -453,7 +446,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
if (!event.isCancelled()) {
|
||||
ClickType.setPlayerClickType(p, new CreateClickType(product, buyPrice, sellPrice, shopType));
|
||||
plugin.debug(p.getName() + " can now click a chest");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_CHEST_CREATE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_CHEST_CREATE));
|
||||
} else {
|
||||
plugin.debug("Shop pre create event cancelled");
|
||||
}
|
||||
@ -464,6 +457,8 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* @param p The command executor
|
||||
*/
|
||||
private void remove(final Player p) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(p.getName() + " wants to remove a shop");
|
||||
|
||||
ShopPreRemoveEvent event = new ShopPreRemoveEvent(p);
|
||||
@ -474,7 +469,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
plugin.debug(p.getName() + " can now click a chest");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_CHEST_REMOVE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_CHEST_REMOVE));
|
||||
ClickType.setPlayerClickType(p, new ClickType(ClickType.EnumClickType.REMOVE));
|
||||
}
|
||||
|
||||
@ -483,6 +478,8 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* @param p The command executor
|
||||
*/
|
||||
private void info(final Player p) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(p.getName() + " wants to retrieve information");
|
||||
|
||||
ShopPreInfoEvent event = new ShopPreInfoEvent(p);
|
||||
@ -493,7 +490,7 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
plugin.debug(p.getName() + " can now click a chest");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_CHEST_INFO));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_CHEST_INFO));
|
||||
ClickType.setPlayerClickType(p, new ClickType(ClickType.EnumClickType.INFO));
|
||||
}
|
||||
|
||||
@ -502,6 +499,8 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
* @param p The command executor
|
||||
*/
|
||||
private void open(final Player p) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(p.getName() + " wants to open a shop");
|
||||
|
||||
ShopPreOpenEvent event = new ShopPreOpenEvent(p);
|
||||
@ -512,11 +511,13 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
}
|
||||
|
||||
plugin.debug(p.getName() + " can now click a chest");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_CHEST_OPEN));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_CHEST_OPEN));
|
||||
ClickType.setPlayerClickType(p, new ClickType(ClickType.EnumClickType.OPEN));
|
||||
}
|
||||
|
||||
private boolean changeConfig(CommandSender sender, String[] args) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(sender.getName() + " is changing the configuration");
|
||||
|
||||
String property = args[2];
|
||||
@ -524,13 +525,13 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
if (args[1].equalsIgnoreCase("set")) {
|
||||
plugin.getShopChestConfig().set(property, value);
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.CHANGED_CONFIG_SET, new Replacement(Placeholder.PROPERTY, property), new Replacement(Placeholder.VALUE, value)));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.CHANGED_CONFIG_SET, new Replacement(Placeholder.PROPERTY, property), new Replacement(Placeholder.VALUE, value)));
|
||||
} else if (args[1].equalsIgnoreCase("add")) {
|
||||
plugin.getShopChestConfig().add(property, value);
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.CHANGED_CONFIG_ADDED, new Replacement(Placeholder.PROPERTY, property), new Replacement(Placeholder.VALUE, value)));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.CHANGED_CONFIG_ADDED, new Replacement(Placeholder.PROPERTY, property), new Replacement(Placeholder.VALUE, value)));
|
||||
} else if (args[1].equalsIgnoreCase("remove")) {
|
||||
plugin.getShopChestConfig().remove(property, value);
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.CHANGED_CONFIG_REMOVED, new Replacement(Placeholder.PROPERTY, property), new Replacement(Placeholder.VALUE, value)));
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.CHANGED_CONFIG_REMOVED, new Replacement(Placeholder.PROPERTY, property), new Replacement(Placeholder.VALUE, value)));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -550,23 +551,27 @@ class ShopCommandExecutor implements CommandExecutor {
|
||||
|
||||
ShopRemoveAllEvent event = new ShopRemoveAllEvent(sender, vendor, shops);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()){
|
||||
if (event.isCancelled()) {
|
||||
plugin.debug("Remove all event cancelled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (Shop shop : shops) {
|
||||
shopUtils.removeShop(shop, true);
|
||||
}
|
||||
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.ALL_SHOPS_REMOVED,
|
||||
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.ALL_SHOPS_REMOVED,
|
||||
new Replacement(Placeholder.AMOUNT, String.valueOf(shops.size())),
|
||||
new Replacement(Placeholder.VENDOR, vendor.getName())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable throwable) {
|
||||
sender.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
sender.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED,
|
||||
new Replacement(Placeholder.ERROR, "Failed to get player's shops")));
|
||||
}
|
||||
});
|
||||
|
@ -1,24 +1,15 @@
|
||||
package de.epiceric.shopchest.config;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.sql.Database;
|
||||
import de.epiceric.shopchest.utils.ItemUtils;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.sql.Database;
|
||||
import de.epiceric.shopchest.utils.ItemUtils;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
|
||||
public class Config {
|
||||
|
||||
/**
|
||||
@ -308,11 +299,6 @@ public class Config {
|
||||
**/
|
||||
public static String languageFile;
|
||||
|
||||
/**
|
||||
* The language configuration of the currently selected language file
|
||||
*/
|
||||
public static LanguageConfiguration langConfig;
|
||||
|
||||
private ShopChest plugin;
|
||||
|
||||
public Config(ShopChest plugin) {
|
||||
@ -506,108 +492,8 @@ public class Config {
|
||||
mainCommandName = plugin.getConfig().getString("main-command-name");
|
||||
languageFile = plugin.getConfig().getString("language-file");
|
||||
|
||||
if (firstLoad || langReload) loadLanguageConfig(showMessages);
|
||||
if (!firstLoad && langReload) LanguageUtils.load();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ShopChest's {@link LanguageConfiguration}
|
||||
*/
|
||||
public LanguageConfiguration getLanguageConfig() {
|
||||
return langConfig;
|
||||
}
|
||||
|
||||
private Reader getTextResource(String file, boolean showMessages) {
|
||||
try {
|
||||
return (Reader) plugin.getClass().getDeclaredMethod("getTextResource", String.class).invoke(plugin, file);
|
||||
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
|
||||
if (showMessages) plugin.getLogger().severe("Failed to get file from jar: " + file);
|
||||
plugin.debug("Failed to get file from jar: " + file);
|
||||
plugin.debug(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void loadLanguageConfig(boolean showMessages) {
|
||||
langConfig = new LanguageConfiguration(plugin, showMessages);
|
||||
File langFolder = new File(plugin.getDataFolder(), "lang");
|
||||
|
||||
String legacy = Utils.getMajorVersion() < 13 ? "-legacy" : "";
|
||||
|
||||
if (!(new File(langFolder, "en_US" + legacy + ".lang")).exists())
|
||||
plugin.saveResource("lang/en_US" + legacy + ".lang", false);
|
||||
|
||||
if (!(new File(langFolder, "de_DE" + legacy + ".lang")).exists())
|
||||
plugin.saveResource("lang/de_DE" + legacy + ".lang", false);
|
||||
|
||||
File langConfigFile = new File(langFolder, languageFile + legacy + ".lang");
|
||||
File langDefaultFile = new File(langFolder, "en_US" + legacy + ".lang");
|
||||
|
||||
if (!langConfigFile.exists()) {
|
||||
if (!langDefaultFile.exists()) {
|
||||
try {
|
||||
Reader r = getTextResource("lang/" + langConfigFile.getName(), showMessages);
|
||||
|
||||
if (r == null) {
|
||||
r = getTextResource("lang/en_US" + legacy + ".lang", showMessages);
|
||||
if (showMessages) plugin.getLogger().info("Using locale \"en_US" + legacy + "\" (Streamed from jar file)");
|
||||
} else {
|
||||
if (showMessages)
|
||||
plugin.getLogger().info("Using locale \"" + langConfigFile.getName().substring(0, langConfigFile.getName().length() - 5) + "\" (Streamed from jar file)");
|
||||
}
|
||||
|
||||
if (r == null) {
|
||||
if (showMessages) plugin.getLogger().warning("Using default language values");
|
||||
plugin.debug("Using default language values (#1)");
|
||||
}
|
||||
|
||||
BufferedReader br = new BufferedReader(r);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line = br.readLine();
|
||||
|
||||
while (line != null) {
|
||||
sb.append(line);
|
||||
sb.append("\n");
|
||||
line = br.readLine();
|
||||
}
|
||||
|
||||
langConfig.loadFromString(sb.toString());
|
||||
} catch (IOException | InvalidConfigurationException e) {
|
||||
if (showMessages) {
|
||||
plugin.getLogger().warning("Using default language values");
|
||||
}
|
||||
|
||||
plugin.debug("Using default language values (#2)");
|
||||
plugin.debug(e);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
langConfig.load(langDefaultFile);
|
||||
if (showMessages) plugin.getLogger().info("Using locale \"en_US" + legacy + "\"");
|
||||
} catch (IOException | InvalidConfigurationException e) {
|
||||
if (showMessages) {
|
||||
plugin.getLogger().warning("Using default language values");
|
||||
}
|
||||
|
||||
plugin.debug("Using default language values (#3)");
|
||||
plugin.debug(e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
if (showMessages)
|
||||
plugin.getLogger().info("Using locale \"" + langConfigFile.getName().substring(0, langConfigFile.getName().length() - 5) + "\"");
|
||||
langConfig.load(langConfigFile);
|
||||
} catch (IOException | InvalidConfigurationException e) {
|
||||
if (showMessages) {
|
||||
plugin.getLogger().warning("Using default language values");
|
||||
}
|
||||
|
||||
plugin.debug("Using default language values (#4)");
|
||||
plugin.debug(e);
|
||||
}
|
||||
if (langReload) {
|
||||
plugin.loadLanguages();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
package de.epiceric.shopchest.config;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
|
||||
public class FileLoader {
|
||||
|
||||
@NotNull
|
||||
public File loadFile(@NotNull String relativePath, @NotNull Plugin plugin, @NotNull String... resourcePaths) throws IOException {
|
||||
final File file = new File(plugin.getDataFolder(), relativePath);
|
||||
if (file.exists()) {
|
||||
if (!file.isFile()) {
|
||||
throw new RuntimeException("'" + file.getAbsoluteFile() + "'should be a file");
|
||||
}
|
||||
return file;
|
||||
}
|
||||
final File parent = file.getParentFile();
|
||||
if (parent != null) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
for (String resourcePath : resourcePaths) {
|
||||
if (loadResource(file, plugin, resourcePath)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
file.createNewFile();
|
||||
return file;
|
||||
}
|
||||
|
||||
private boolean loadResource(@NotNull File out, @NotNull Plugin plugin, @Nullable String resourcePath) throws IOException {
|
||||
final InputStream is;
|
||||
if (resourcePath == null || (is = plugin.getResource(resourcePath)) == null) {
|
||||
return false;
|
||||
}
|
||||
Files.copy(is, out.toPath());
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -1,132 +0,0 @@
|
||||
package de.epiceric.shopchest.config;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
|
||||
public class LanguageConfiguration extends FileConfiguration {
|
||||
|
||||
private ArrayList<String> lines = new ArrayList<>();
|
||||
private HashMap<String, String> values = new HashMap<>();
|
||||
|
||||
private ShopChest plugin;
|
||||
private boolean showMessages;
|
||||
private File file;
|
||||
|
||||
public LanguageConfiguration(ShopChest plugin, boolean showMessages) {
|
||||
this.plugin = plugin;
|
||||
this.showMessages = showMessages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveToString() {
|
||||
StringBuilder sb = new StringBuilder("");
|
||||
|
||||
for (String line : lines) {
|
||||
sb.append(line);
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(String path, String def) {
|
||||
for (String key : values.keySet()) {
|
||||
if (key.equals(path)) {
|
||||
return values.get(key);
|
||||
}
|
||||
}
|
||||
|
||||
values.put(path, def);
|
||||
|
||||
if (file != null) {
|
||||
// Append missing entry to loaded language file
|
||||
try (FileWriter writer = new FileWriter(file, true)) {
|
||||
writer.write(path + "=" + def + "\n");
|
||||
if (showMessages)
|
||||
plugin.getLogger().info("Missing translation for \"" + path + "\" has been added as \"" + def + "\" to the selected language file.");
|
||||
} catch (IOException e) {
|
||||
plugin.debug("Failed to add language entry");
|
||||
plugin.debug(e);
|
||||
if (showMessages)
|
||||
plugin.getLogger().severe("Failed to add missing translation for \"" + path + "\" to the selected langauge file.");
|
||||
}
|
||||
}
|
||||
|
||||
return def;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(File file) throws IOException, InvalidConfigurationException {
|
||||
this.file = file;
|
||||
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
|
||||
BufferedReader br = new BufferedReader(isr);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
String line = br.readLine();
|
||||
while (line != null) {
|
||||
sb.append(line);
|
||||
sb.append("\n");
|
||||
line = br.readLine();
|
||||
}
|
||||
|
||||
fis.close();
|
||||
isr.close();
|
||||
br.close();
|
||||
|
||||
loadFromString(sb.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadFromString(String s) throws InvalidConfigurationException {
|
||||
String[] lines = s.split("\n");
|
||||
for (String line : lines) {
|
||||
if (!line.isEmpty()) {
|
||||
this.lines.add(line);
|
||||
|
||||
if (!line.startsWith("#")) {
|
||||
if (line.contains("=")) {
|
||||
if (line.split("=").length >= 2) {
|
||||
String key = line.split("=")[0];
|
||||
StringBuilder sbValue = new StringBuilder();
|
||||
|
||||
for (int i = 1; i < line.split("=").length; i++) {
|
||||
if (i > 1) {
|
||||
sbValue.append("=");
|
||||
}
|
||||
sbValue.append(line.split("=")[i]);
|
||||
}
|
||||
|
||||
String value = sbValue.toString();
|
||||
|
||||
values.put(key, value);
|
||||
} else if (line.split("=").length == 1) {
|
||||
String key = line.split("=")[0];
|
||||
values.put(key, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildHeader() {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package de.epiceric.shopchest.config;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class LanguageConfigurationLoader {
|
||||
|
||||
@NotNull
|
||||
public Map<String, String> getTranslations(@NotNull File file, @NotNull Logger logger) {
|
||||
final List<String> lines;
|
||||
try {
|
||||
lines = Files.readAllLines(file.toPath());
|
||||
} catch (IOException e) {
|
||||
logger.log(Level.WARNING, "Can not read the message registry", e);
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
final Map<String, String> registry = new HashMap<>();
|
||||
for (String line : lines) {
|
||||
line = line.trim();
|
||||
if (line.length() == 0 || line.charAt(0) == '#') {
|
||||
continue;
|
||||
}
|
||||
final String[] parts = line.split("=", 2);
|
||||
if (parts.length != 2) {
|
||||
logger.warning("Invalid line in message registry : '" + line + "'");
|
||||
continue;
|
||||
}
|
||||
final String id = parts[0];
|
||||
final String value = parts[1];
|
||||
registry.put(id, value);
|
||||
}
|
||||
return registry;
|
||||
}
|
||||
|
||||
}
|
@ -29,7 +29,7 @@ public enum Placeholder {
|
||||
COMMAND("%COMMAND%"),
|
||||
DURABILITY("%DURABILITY%");
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
Placeholder(String name) {
|
||||
this.name = name;
|
||||
|
@ -0,0 +1,54 @@
|
||||
package de.epiceric.shopchest.language;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.FileLoader;
|
||||
import de.epiceric.shopchest.config.LanguageConfigurationLoader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class LanguageLoader {
|
||||
|
||||
private final static String DEFAULT_LOCALE = "en_US";
|
||||
private final static String MESSAGES_FILENAME = "messages";
|
||||
private final static String ITEMS_FILENAME = "items";
|
||||
|
||||
@NotNull
|
||||
public LanguageManager loadLanguageManager(@NotNull ShopChest shopChestPlugin, @NotNull String locale) {
|
||||
final Logger logger = shopChestPlugin.getLogger();
|
||||
final FileLoader fileLoader = new FileLoader();
|
||||
final LanguageConfigurationLoader languageConfigurationLoader = new LanguageConfigurationLoader();
|
||||
|
||||
final String requestedMessagePath = generateLocalizedPath(MESSAGES_FILENAME, locale);
|
||||
final String defaultResourceMessagePath = generateLocalizedPath(MESSAGES_FILENAME, DEFAULT_LOCALE);
|
||||
final File messagesFile;
|
||||
try {
|
||||
messagesFile = fileLoader.loadFile(requestedMessagePath, shopChestPlugin, requestedMessagePath, defaultResourceMessagePath);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
final Map<String, String> storedMessages = languageConfigurationLoader.getTranslations(messagesFile, logger);
|
||||
final MessageRegistryLoader messageRegistryLoader = new MessageRegistryLoader(storedMessages);
|
||||
final String[] messages = messageRegistryLoader.getMessages();
|
||||
final MessageRegistry messageRegistry = new MessageRegistry(messages, p -> shopChestPlugin.getEconomy().format(p));
|
||||
|
||||
final String requestedItemsPath = generateLocalizedPath(ITEMS_FILENAME, locale);
|
||||
final File itemsFile;
|
||||
try {
|
||||
itemsFile = fileLoader.loadFile(requestedItemsPath, shopChestPlugin);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
final Map<String, String> storedItems = languageConfigurationLoader.getTranslations(itemsFile, logger);
|
||||
return new LanguageManager(messageRegistry);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String generateLocalizedPath(@NotNull String fileName, @NotNull String locale) {
|
||||
return "lang" + File.separator + fileName + "-" + locale + ".lang";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package de.epiceric.shopchest.language;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class LanguageManager {
|
||||
|
||||
private final MessageRegistry messageRegistry;
|
||||
|
||||
public LanguageManager(@NotNull MessageRegistry messageRegistry) {
|
||||
this.messageRegistry = messageRegistry;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public MessageRegistry getMessageRegistry() {
|
||||
return messageRegistry;
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
package de.epiceric.shopchest.language;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class LocalizedMessage {
|
||||
|
||||
private Message message;
|
||||
private String localizedString;
|
||||
|
||||
public LocalizedMessage(Message message, String localizedString) {
|
||||
this.message = message;
|
||||
this.localizedString = ChatColor.translateAlternateColorCodes('&', localizedString);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@link Message} linked to this object
|
||||
*/
|
||||
public Message getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Localized Message
|
||||
*/
|
||||
public String getLocalizedString() {
|
||||
return localizedString;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package de.epiceric.shopchest.language;
|
||||
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public class MessageRegistry {
|
||||
|
||||
private final String[] messages;
|
||||
private final Function<Double, String> priceFormatter;
|
||||
|
||||
public MessageRegistry(@NotNull String[] messages, @NotNull Function<Double, String> priceFormatter) {
|
||||
this.messages = messages;
|
||||
this.priceFormatter = priceFormatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message Message which should be translated
|
||||
* @param replacements Replacements of placeholders which might be required to be replaced in the message
|
||||
* @return Localized Message
|
||||
*/
|
||||
@NotNull
|
||||
public String getMessage(@NotNull Message message, @NotNull Replacement... replacements) {
|
||||
final String storedMessage = messages[message.ordinal()];
|
||||
if (storedMessage == null) {
|
||||
// Mimic old behavior -> send an error message to the player
|
||||
return ChatColor.RED + "An error occurred: Message not found: " + message;
|
||||
}
|
||||
|
||||
return applyReplacements(storedMessage, replacements);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String applyReplacements(@NotNull String message, @NotNull Replacement... replacements) {
|
||||
for (Replacement replacement : replacements) {
|
||||
final Placeholder placeholder = replacement.getPlaceholder();
|
||||
String toReplace = replacement.getReplacement();
|
||||
|
||||
if ((placeholder == Placeholder.BUY_PRICE || placeholder == Placeholder.SELL_PRICE || placeholder == Placeholder.MIN_PRICE || placeholder == Placeholder.CREATION_PRICE || placeholder == Placeholder.REVENUE)
|
||||
&& !toReplace.equals(getMessage(Message.SHOP_INFO_DISABLED))
|
||||
) {
|
||||
double price = Double.parseDouble(toReplace);
|
||||
toReplace = priceFormatter.apply(price);
|
||||
}
|
||||
|
||||
message = message.replace(placeholder.toString(), toReplace);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package de.epiceric.shopchest.language;
|
||||
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class MessageRegistryLoader {
|
||||
|
||||
private final Map<String, String> storedMessages;
|
||||
|
||||
public MessageRegistryLoader(@NotNull Map<String, String> storedMessages) {
|
||||
this.storedMessages = storedMessages;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String[] getMessages() {
|
||||
final String[] messages = new String[Message.values().length];
|
||||
// Add ShopChest Messages
|
||||
registerAll(messages);
|
||||
return messages;
|
||||
}
|
||||
|
||||
private void registerAll(@NotNull String[] messages) {
|
||||
register(messages, Message.SHOP_CREATED, "message.shop-created", "&6You were withdrawn &c%CREATION-PRICE% &6to create this shop.");
|
||||
register(messages, Message.ADMIN_SHOP_CREATED, "message.admin-shop-created", "&6You were withdrawn &c%CREATION-PRICE% &6to create this admin shop.");
|
||||
register(messages, Message.CHEST_ALREADY_SHOP, "message.chest-already-shop", "&cChest already shop.");
|
||||
register(messages, Message.CHEST_BLOCKED, "message.chest-blocked", "&cThere must not be a block above the chest.");
|
||||
register(messages, Message.DOUBLE_CHEST_BLOCKED, "message.double-chest-blocked", "&cThere must not be a block above the chest.");
|
||||
register(messages, Message.SHOP_REMOVED, "message.shop-removed", "&6Shop removed.");
|
||||
register(messages, Message.SHOP_REMOVED_REFUND, "message.shop-removed-refund", "&6Shop removed. You were refunded &c%CREATION-PRICE%&6.");
|
||||
register(messages, Message.ALL_SHOPS_REMOVED, "message.all-shops-removed", "&6Removed all (&c%AMOUNT%&6) shop/s of &c%VENDOR%&6.");
|
||||
register(messages, Message.CHEST_NO_SHOP, "message.chest-no-shop", "&cChest is not a shop.");
|
||||
register(messages, Message.SHOP_CREATE_NOT_ENOUGH_MONEY, "message.shop-create-not-enough-money", "&cNot enough money. You need &6%CREATION-PRICE% &cto create a shop.");
|
||||
register(messages, Message.SHOP_INFO_VENDOR, "message.shopInfo.vendor", "&6Vendor: &e%VENDOR%");
|
||||
register(messages, Message.SHOP_INFO_PRODUCT, "message.shopInfo.product", "&6Product: &e%AMOUNT% x %ITEMNAME%");
|
||||
register(messages, Message.SHOP_INFO_STOCK, "message.shopInfo.stock", "&6In Stock: &e%STOCK%");
|
||||
register(messages, Message.SHOP_INFO_CHEST_SPACE, "message.shopInfo.chest-space", "&6Space in chest: &e%CHEST-SPACE%");
|
||||
register(messages, Message.SHOP_INFO_PRICE, "message.shopInfo.price", "&6Price: Buy: &e%BUY-PRICE%&6 Sell: &e%SELL-PRICE%");
|
||||
register(messages, Message.SHOP_INFO_DISABLED, "message.shopInfo.disabled", "&7Disabled");
|
||||
register(messages, Message.SHOP_INFO_NORMAL, "message.shopInfo.is-normal", "&6Type: &eNormal");
|
||||
register(messages, Message.SHOP_INFO_ADMIN, "message.shopInfo.is-admin", "&6Type: &eAdmin");
|
||||
register(messages, Message.BUY_SELL_DISABLED, "message.buy-and-sell-disabled", "&cYou can't create a shop with buying and selling disabled.");
|
||||
register(messages, Message.BUY_SUCCESS, "message.buy-success", "&aYou bought &6%AMOUNT% x %ITEMNAME%&a for &6%BUY-PRICE%&a from &6%VENDOR%&a.");
|
||||
register(messages, Message.BUY_SUCCESS_ADMIN, "message.buy-success-admin", "&aYou bought &6%AMOUNT% x %ITEMNAME%&a for &6%BUY-PRICE%&a.");
|
||||
register(messages, Message.SELL_SUCCESS, "message.sell-success", "&aYou sold &6%AMOUNT% x %ITEMNAME%&a for &6%SELL-PRICE%&a to &6%VENDOR%&a.");
|
||||
register(messages, Message.SELL_SUCCESS_ADMIN, "message.sell-success-admin", "&aYou sold &6%AMOUNT% x %ITEMNAME%&a for &6%SELL-PRICE%&a.");
|
||||
register(messages, Message.SOMEONE_BOUGHT, "message.someone-bought", "&6%PLAYER% &abought &6%AMOUNT% x %ITEMNAME%&a for &6%BUY-PRICE%&a from your shop.");
|
||||
register(messages, Message.SOMEONE_SOLD, "message.someone-sold", "&6%PLAYER% &asold &6%AMOUNT% x %ITEMNAME%&a for &6%SELL-PRICE%&a to your shop.");
|
||||
register(messages, Message.REVENUE_WHILE_OFFLINE, "message.revenue-while-offline", "&6While you were offline, your shops have made a revenue of &c%REVENUE%&6.");
|
||||
register(messages, Message.NOT_ENOUGH_INVENTORY_SPACE, "message.not-enough-inventory-space", "&cNot enough space in inventory.");
|
||||
register(messages, Message.CHEST_NOT_ENOUGH_INVENTORY_SPACE, "message.chest-not-enough-inventory-space", "&cShop is full.");
|
||||
register(messages, Message.NOT_ENOUGH_MONEY, "message.not-enough-money", "&cNot enough money.");
|
||||
register(messages, Message.NOT_ENOUGH_ITEMS, "message.not-enough-items", "&cNot enough items.");
|
||||
register(messages, Message.VENDOR_NOT_ENOUGH_MONEY, "message.vendor-not-enough-money", "&cVendor has not enough money.");
|
||||
register(messages, Message.OUT_OF_STOCK, "message.out-of-stock", "&cShop out of stock.");
|
||||
register(messages, Message.VENDOR_OUT_OF_STOCK, "message.vendor-out-of-stock", "&cYour shop that sells &6%AMOUNT% x %ITEMNAME% &cis out of stock.");
|
||||
register(messages, Message.ERROR_OCCURRED, "message.error-occurred", "&cAn error occurred: %ERROR%");
|
||||
register(messages, Message.AMOUNT_PRICE_NOT_NUMBER, "message.amount-and-price-not-number", "&cAmount and price must be a number.");
|
||||
register(messages, Message.AMOUNT_IS_ZERO, "message.amount-is-zero", "&cAmount must be greater than 0.");
|
||||
register(messages, Message.PRICES_CONTAIN_DECIMALS, "message.prices-contain-decimals", "&cPrices must not contain decimals.");
|
||||
register(messages, Message.NO_ITEM_IN_HAND, "message.no-item-in-hand", "&cNo item in hand");
|
||||
register(messages, Message.CLICK_CHEST_CREATE, "message.click-chest-to-create-shop", "&aClick a chest within 15 seconds to create a shop.");
|
||||
register(messages, Message.CLICK_CHEST_REMOVE, "message.click-chest-to-remove-shop", "&aClick a shop within 15 seconds to remove it.");
|
||||
register(messages, Message.CLICK_CHEST_INFO, "message.click-chest-for-info", "&aClick a shop within 15 seconds to retrieve information.");
|
||||
register(messages, Message.CLICK_CHEST_OPEN, "message.click-chest-to-open-shop", "&aClick a shop within 15 seconds to open it.");
|
||||
register(messages, Message.CLICK_TO_CONFIRM, "message.click-to-confirm", "&aClick again to confirm.");
|
||||
register(messages, Message.OPENED_SHOP, "message.opened-shop", "&aYou opened %VENDOR%'s shop.");
|
||||
register(messages, Message.CANNOT_BREAK_SHOP, "message.cannot-break-shop", "&cYou can't break a shop.");
|
||||
register(messages, Message.CANNOT_SELL_BROKEN_ITEM, "message.cannot-sell-broken-item", "&cYou can't sell a broken item.");
|
||||
register(messages, Message.BUY_PRICE_TOO_LOW, "message.buy-price-too-low", "&cThe buy price must be higher than %MIN-PRICE%.");
|
||||
register(messages, Message.SELL_PRICE_TOO_LOW, "message.sell-price-too-low", "&cThe sell price must be higher than %MIN-PRICE%.");
|
||||
register(messages, Message.BUY_PRICE_TOO_HIGH, "message.buy-price-too-high", "&cThe buy price must be lower than %MAX-PRICE%.");
|
||||
register(messages, Message.SELL_PRICE_TOO_HIGH, "message.sell-price-too-high", "&cThe sell price must be lower than %MAX-PRICE%.");
|
||||
register(messages, Message.BUYING_DISABLED, "message.buying-disabled", "&cBuying is disabled at this shop.");
|
||||
register(messages, Message.SELLING_DISABLED, "message.selling-disabled", "&cSelling is disabled at this shop.");
|
||||
register(messages, Message.RELOADED_SHOPS, "message.reloaded-shops", "&aSuccessfully reloaded %AMOUNT% shop/s.");
|
||||
register(messages, Message.SHOP_LIMIT_REACHED, "message.shop-limit-reached", "&cYou reached your limit of &6%LIMIT% &cshop/s.");
|
||||
register(messages, Message.OCCUPIED_SHOP_SLOTS, "message.occupied-shop-slots", "&6You have &c%AMOUNT%/%LIMIT% &6shop slot/s occupied.");
|
||||
register(messages, Message.CANNOT_SELL_ITEM, "message.cannot-sell-item", "&cYou cannot create a shop with this item.");
|
||||
register(messages, Message.USE_IN_CREATIVE, "message.use-in-creative", "&cYou cannot use a shop in creative mode.");
|
||||
register(messages, Message.SELECT_ITEM, "message.select-item", "&aOpen your inventory, and drop an item to select it.");
|
||||
register(messages, Message.ITEM_SELECTED, "message.item-selected", "&aItem has been selected: &6%ITEMNAME%");
|
||||
register(messages, Message.CREATION_CANCELLED, "message.creation-cancelled", "&cShop creation has been cancelled.");
|
||||
register(messages, Message.UPDATE_AVAILABLE, "message.update.update-available", "&6&lVersion &c%VERSION% &6of &cShopChest &6is available &chere.");
|
||||
register(messages, Message.UPDATE_CLICK_TO_DOWNLOAD, "message.update.click-to-download", "Click to download");
|
||||
register(messages, Message.UPDATE_NO_UPDATE, "message.update.no-update", "&6&lNo new update available.");
|
||||
register(messages, Message.UPDATE_CHECKING, "message.update.checking", "&6&lChecking for updates...");
|
||||
register(messages, Message.UPDATE_ERROR, "message.update.error", "&c&lError while checking for updates.");
|
||||
register(messages, Message.NO_PERMISSION_CREATE, "message.noPermission.create", "&cYou don't have permission to create a shop.");
|
||||
register(messages, Message.NO_PERMISSION_CREATE_ADMIN, "message.noPermission.create-admin", "&cYou don't have permission to create an admin shop.");
|
||||
register(messages, Message.NO_PERMISSION_CREATE_PROTECTED, "message.noPermission.create-protected", "&cYou don't have permission to create a shop on a protected chest.");
|
||||
register(messages, Message.NO_PERMISSION_OPEN_OTHERS, "message.noPermission.open-others", "&cYou don't have permission to open this chest.");
|
||||
register(messages, Message.NO_PERMISSION_BUY, "message.noPermission.buy", "&cYou don't have permission to buy something.");
|
||||
register(messages, Message.NO_PERMISSION_SELL, "message.noPermission.sell", "&cYou don't have permission to sell something.");
|
||||
register(messages, Message.NO_PERMISSION_BUY_HERE, "message.noPermission.buy-here", "&cYou don't have permission to buy something here.");
|
||||
register(messages, Message.NO_PERMISSION_SELL_HERE, "message.noPermission.sell-here", "&cYou don't have permission to sell something here.");
|
||||
register(messages, Message.NO_PERMISSION_REMOVE_OTHERS, "message.noPermission.remove-others", "&cYou don't have permission to remove this shop.");
|
||||
register(messages, Message.NO_PERMISSION_REMOVE_ADMIN, "message.noPermission.remove-admin", "&cYou don't have permission to remove an admin shop.");
|
||||
register(messages, Message.NO_PERMISSION_RELOAD, "message.noPermission.reload", "&cYou don't have permission to reload the shops.");
|
||||
register(messages, Message.NO_PERMISSION_UPDATE, "message.noPermission.update", "&cYou don't have permission to check for updates.");
|
||||
register(messages, Message.NO_PERMISSION_CONFIG, "message.noPermission.config", "&cYou don't have permission to change configuration values.");
|
||||
register(messages, Message.NO_PERMISSION_EXTEND_OTHERS, "message.noPermission.extend-others", "&cYou don't have permission to extend this chest.");
|
||||
register(messages, Message.NO_PERMISSION_EXTEND_PROTECTED, "message.noPermission.extend-protected", "&cYou don't have permission to extend this chest to here.");
|
||||
register(messages, Message.COMMAND_DESC_HEADER, "message.commandDescription.header", "&6==== &c/%COMMAND% &6Help");
|
||||
register(messages, Message.COMMAND_DESC_FOOTER, "message.commandDescription.footer", "&6==== End");
|
||||
register(messages, Message.COMMAND_DESC_CREATE, "message.commandDescription.create", "&a/%COMMAND% create <amount> <buy-price> <sell-price> - Create a shop.");
|
||||
register(messages, Message.COMMAND_DESC_CREATE_ADMIN, "message.commandDescription.create-admin", "&a/%COMMAND% create <amount> <buy-price> <sell-price> [admin] - Create a shop.");
|
||||
register(messages, Message.COMMAND_DESC_REMOVE, "message.commandDescription.remove", "&a/%COMMAND% remove - Remove a shop.");
|
||||
register(messages, Message.COMMAND_DESC_INFO, "message.commandDescription.info", "&a/%COMMAND% info - Retrieve shop information.");
|
||||
register(messages, Message.COMMAND_DESC_REMOVEALL, "message.commandDescription.removeall", "&a/%COMMAND% removeall - Remove all shops of a player.");
|
||||
register(messages, Message.COMMAND_DESC_RELOAD, "message.commandDescription.reload", "&a/%COMMAND% reload - Reload shops.");
|
||||
register(messages, Message.COMMAND_DESC_UPDATE, "message.commandDescription.update", "&a/%COMMAND% update - Check for Updates.");
|
||||
register(messages, Message.COMMAND_DESC_LIMITS, "message.commandDescription.limits", "&a/%COMMAND% limits - View shop limits.");
|
||||
register(messages, Message.COMMAND_DESC_OPEN, "message.commandDescription.open", "&a/%COMMAND% open - Open a shop.");
|
||||
register(messages, Message.COMMAND_DESC_CONFIG, "message.commandDescription.config", "&a/%COMMAND% config <set|add|remove> <property> <value> - Change configuration values.");
|
||||
register(messages, Message.CHANGED_CONFIG_SET, "message.config.set", "&6Changed &a%PROPERTY% &6to &a%VALUE%&6.");
|
||||
register(messages, Message.CHANGED_CONFIG_REMOVED, "message.config.removed", "&6Removed &a%VALUE% &6from &a%PROPERTY%&6.");
|
||||
register(messages, Message.CHANGED_CONFIG_ADDED, "message.config.added", "&6Added &a%VALUE% &6to &a%PROPERTY%&6.");
|
||||
}
|
||||
|
||||
private void register(@NotNull String[] messages, @NotNull Message message, @NotNull String path, @Nullable String defaultValue) {
|
||||
final String rawValue = storedMessages.getOrDefault(path, defaultValue);
|
||||
messages[message.ordinal()] = ChatColor.translateAlternateColorCodes('&', rawValue);
|
||||
}
|
||||
|
||||
}
|
@ -4,8 +4,8 @@ import de.epiceric.shopchest.config.Placeholder;
|
||||
|
||||
public class Replacement {
|
||||
|
||||
private Placeholder placeholder;
|
||||
private String replacement;
|
||||
private final Placeholder placeholder;
|
||||
private final String replacement;
|
||||
|
||||
public Replacement(Placeholder placeholder, Object replacement) {
|
||||
this.placeholder = placeholder;
|
||||
|
@ -1,7 +1,16 @@
|
||||
package de.epiceric.shopchest.listeners;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.event.ShopExtendEvent;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
import de.epiceric.shopchest.utils.*;
|
||||
import net.milkbowl.vault.economy.EconomyResponse;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -21,21 +30,7 @@ import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.event.ShopExtendEvent;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
import de.epiceric.shopchest.utils.Callback;
|
||||
import de.epiceric.shopchest.utils.ItemUtils;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
import de.epiceric.shopchest.utils.ShopUtils;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
import net.milkbowl.vault.economy.EconomyResponse;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ChestProtectListener implements Listener {
|
||||
|
||||
@ -48,6 +43,7 @@ public class ChestProtectListener implements Listener {
|
||||
}
|
||||
|
||||
private void remove(final Shop shop, final Block b, final Player p) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
if (shop.getInventoryHolder() instanceof DoubleChest) {
|
||||
DoubleChest dc = (DoubleChest) shop.getInventoryHolder();
|
||||
final Chest l = (Chest) dc.getLeftSide();
|
||||
@ -69,16 +65,16 @@ public class ChestProtectListener implements Listener {
|
||||
EconomyResponse r = plugin.getEconomy().depositPlayer(p, shop.getLocation().getWorld().getName(), creationPrice);
|
||||
if (!r.transactionSuccess()) {
|
||||
plugin.debug("Economy transaction failed: " + r.errorMessage);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
||||
p.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED,
|
||||
new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
new Replacement(Placeholder.CREATION_PRICE, 0)));
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
new Replacement(Placeholder.CREATION_PRICE, creationPrice)));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
new Replacement(Placeholder.CREATION_PRICE, creationPrice)));
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SHOP_REMOVED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SHOP_REMOVED));
|
||||
}
|
||||
|
||||
shopUtils.removeShop(shop, true);
|
||||
@ -115,7 +111,8 @@ public class ChestProtectListener implements Listener {
|
||||
}
|
||||
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(LanguageUtils.getMessage(Message.CANNOT_BREAK_SHOP));
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
e.getPlayer().sendMessage(messageRegistry.getMessage(Message.CANNOT_BREAK_SHOP));
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,21 +193,24 @@ public class ChestProtectListener implements Listener {
|
||||
|
||||
ShopExtendEvent event = new ShopExtendEvent(p, shop, b.getLocation());
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
if (event.isCancelled() && !p.hasPermission(Permissions.EXTEND_PROTECTED)) {
|
||||
e.setCancelled(true);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_EXTEND_PROTECTED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_EXTEND_PROTECTED));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!p.getUniqueId().equals(shop.getVendor().getUniqueId()) && !p.hasPermission(Permissions.EXTEND_OTHER)) {
|
||||
e.setCancelled(true);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_EXTEND_OTHERS));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_EXTEND_OTHERS));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ItemUtils.isAir(b.getRelative(BlockFace.UP).getType())) {
|
||||
e.setCancelled(true);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CHEST_BLOCKED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CHEST_BLOCKED));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
package de.epiceric.shopchest.listeners;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.utils.ClickType;
|
||||
import de.epiceric.shopchest.utils.ClickType.SelectClickType;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
@ -15,19 +20,7 @@ import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryDragEvent;
|
||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.utils.ClickType;
|
||||
import de.epiceric.shopchest.utils.ClickType.SelectClickType;
|
||||
import org.bukkit.event.player.*;
|
||||
|
||||
public class CreativeModeListener implements Listener {
|
||||
private ShopChest plugin;
|
||||
@ -55,8 +48,11 @@ public class CreativeModeListener implements Listener {
|
||||
((SelectClickType) clickType).setItem(e.getCursor());
|
||||
p.closeInventory();
|
||||
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.ITEM_SELECTED,
|
||||
new Replacement(Placeholder.ITEM_NAME, LanguageUtils.getItemName(e.getCursor()))));
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
p.sendMessage(messageRegistry.getMessage(Message.ITEM_SELECTED
|
||||
// TODO Link it
|
||||
//, new Replacement(Placeholder.ITEM_NAME, LanguageUtils.getItemName(e.getCursor()))
|
||||
));
|
||||
plugin.getShopCommand().createShopAfterSelected(p, (SelectClickType) clickType);
|
||||
}
|
||||
}
|
||||
@ -74,7 +70,8 @@ public class CreativeModeListener implements Listener {
|
||||
return;
|
||||
|
||||
ClickType.removePlayerClickType(p);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CREATION_CANCELLED));
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CREATION_CANCELLED));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -1,21 +1,20 @@
|
||||
package de.epiceric.shopchest.listeners;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.utils.Callback;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.utils.Callback;
|
||||
import de.epiceric.shopchest.utils.Permissions;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
|
||||
public class NotifyPlayerOnJoinListener implements Listener {
|
||||
|
||||
private ShopChest plugin;
|
||||
@ -46,7 +45,8 @@ public class NotifyPlayerOnJoinListener implements Listener {
|
||||
@Override
|
||||
public void onResult(Double result) {
|
||||
if (result != 0) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.REVENUE_WHILE_OFFLINE,
|
||||
final MessageRegistry messageRegistry = ShopChest.getInstance().getLanguageManager().getMessageRegistry();
|
||||
p.sendMessage(messageRegistry.getMessage(Message.REVENUE_WHILE_OFFLINE,
|
||||
new Replacement(Placeholder.REVENUE, String.valueOf(result))));
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.event.*;
|
||||
import de.epiceric.shopchest.external.PlotSquaredOldShopFlag;
|
||||
import de.epiceric.shopchest.external.PlotSquaredShopFlag;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
import de.epiceric.shopchest.shop.Shop.ShopType;
|
||||
@ -46,7 +46,6 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ShopInteractListener implements Listener {
|
||||
|
||||
@ -95,6 +94,8 @@ public class ShopInteractListener implements Listener {
|
||||
Player p = e.getPlayer();
|
||||
Block b = e.getClickedBlock();
|
||||
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
if (e.getAction() != Action.RIGHT_CLICK_BLOCK)
|
||||
return;
|
||||
|
||||
@ -111,13 +112,13 @@ public class ShopInteractListener implements Listener {
|
||||
return;
|
||||
|
||||
if (e.isCancelled() && !p.hasPermission(Permissions.CREATE_PROTECTED)) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_CREATE_PROTECTED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_CREATE_PROTECTED));
|
||||
plugin.debug(p.getName() + " is not allowed to create a shop on the selected chest");
|
||||
} else if (shopUtils.isShop(b.getLocation())) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CHEST_ALREADY_SHOP));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CHEST_ALREADY_SHOP));
|
||||
plugin.debug("Chest is already a shop");
|
||||
} else if (!ItemUtils.isAir(b.getRelative(BlockFace.UP).getType())) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CHEST_BLOCKED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CHEST_BLOCKED));
|
||||
plugin.debug("Chest is blocked");
|
||||
} else {
|
||||
CreateClickType clickType = (CreateClickType) ClickType.getPlayerClickType(p);
|
||||
@ -136,6 +137,8 @@ public class ShopInteractListener implements Listener {
|
||||
private Map<UUID, Set<Integer>> needsConfirmation = new HashMap<>();
|
||||
|
||||
private void handleInteractEvent(PlayerInteractEvent e) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
Block b = e.getClickedBlock();
|
||||
Player p = e.getPlayer();
|
||||
boolean inverted = Config.invertMouseButtons;
|
||||
@ -161,7 +164,7 @@ public class ShopInteractListener implements Listener {
|
||||
break;
|
||||
default:
|
||||
if (shop == null) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CHEST_NO_SHOP));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CHEST_NO_SHOP));
|
||||
plugin.debug("Chest is not a shop");
|
||||
return;
|
||||
}
|
||||
@ -221,7 +224,7 @@ public class ShopInteractListener implements Listener {
|
||||
|
||||
if (p.getGameMode() == GameMode.CREATIVE) {
|
||||
e.setCancelled(true);
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.USE_IN_CREATIVE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.USE_IN_CREATIVE));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -272,14 +275,14 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Needs confirmation");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
Set<Integer> ids = needsConfirmation.containsKey(p.getUniqueId()) ? needsConfirmation.get(p.getUniqueId()) : new HashSet<Integer>();
|
||||
ids.add(shop.getID());
|
||||
needsConfirmation.put(p.getUniqueId(), ids);
|
||||
}
|
||||
} else {
|
||||
plugin.debug(p.getName() + " doesn't have external plugin's permission");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_BUY_HERE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_BUY_HERE));
|
||||
}
|
||||
} else {
|
||||
if (externalPluginsAllowed || p.hasPermission(Permissions.BYPASS_EXTERNAL_PLUGIN)) {
|
||||
@ -298,7 +301,7 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Needs confirmation");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
Set<Integer> ids = needsConfirmation.containsKey(p.getUniqueId()) ? needsConfirmation.get(p.getUniqueId()) : new HashSet<Integer>();
|
||||
ids.add(shop.getID());
|
||||
needsConfirmation.put(p.getUniqueId(), ids);
|
||||
@ -315,19 +318,19 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Needs confirmation");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
Set<Integer> ids = needsConfirmation.containsKey(p.getUniqueId()) ? needsConfirmation.get(p.getUniqueId()) : new HashSet<Integer>();
|
||||
ids.add(shop.getID());
|
||||
needsConfirmation.put(p.getUniqueId(), ids);
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.OUT_OF_STOCK));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.OUT_OF_STOCK));
|
||||
if (shop.getVendor().isOnline() && Config.enableVendorMessages) {
|
||||
shop.getVendor().getPlayer().sendMessage(LanguageUtils.getMessage(Message.VENDOR_OUT_OF_STOCK,
|
||||
shop.getVendor().getPlayer().sendMessage(messageRegistry.getMessage(Message.VENDOR_OUT_OF_STOCK,
|
||||
new Replacement(Placeholder.AMOUNT, String.valueOf(shop.getProduct().getAmount())),
|
||||
new Replacement(Placeholder.ITEM_NAME, shop.getProduct().getLocalizedName())));
|
||||
new Replacement(Placeholder.ITEM_NAME, shop.getProduct().getLocalizedName())));
|
||||
} else if(!shop.getVendor().isOnline() && Config.enableVendorBungeeMessages){
|
||||
String message = LanguageUtils.getMessage(Message.VENDOR_OUT_OF_STOCK,
|
||||
String message = messageRegistry.getMessage(Message.VENDOR_OUT_OF_STOCK,
|
||||
new Replacement(Placeholder.AMOUNT, String.valueOf(shop.getProduct().getAmount())),
|
||||
new Replacement(Placeholder.ITEM_NAME, shop.getProduct().getLocalizedName()));
|
||||
sendBungeeMessage(shop.getVendor().getName(), message);
|
||||
@ -337,15 +340,15 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
plugin.debug(p.getName() + " doesn't have external plugin's permission");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_BUY_HERE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_BUY_HERE));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_BUY));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_BUY));
|
||||
plugin.debug(p.getName() + " is not permitted to buy");
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.BUYING_DISABLED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.BUYING_DISABLED));
|
||||
plugin.debug("Buying is disabled");
|
||||
}
|
||||
}
|
||||
@ -402,7 +405,7 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Needs confirmation");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
Set<Integer> ids = needsConfirmation.containsKey(p.getUniqueId()) ? needsConfirmation.get(p.getUniqueId()) : new HashSet<Integer>();
|
||||
ids.add(shop.getID());
|
||||
needsConfirmation.put(p.getUniqueId(), ids);
|
||||
@ -419,26 +422,26 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Needs confirmation");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.CLICK_TO_CONFIRM));
|
||||
Set<Integer> ids = needsConfirmation.containsKey(p.getUniqueId()) ? needsConfirmation.get(p.getUniqueId()) : new HashSet<Integer>();
|
||||
ids.add(shop.getID());
|
||||
needsConfirmation.put(p.getUniqueId(), ids);
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NOT_ENOUGH_ITEMS));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NOT_ENOUGH_ITEMS));
|
||||
plugin.debug(p.getName() + " doesn't have enough items");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
plugin.debug(p.getName() + " doesn't have external plugin's permission");
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_SELL_HERE));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_SELL_HERE));
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_SELL));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_SELL));
|
||||
plugin.debug(p.getName() + " is not permitted to sell");
|
||||
}
|
||||
} else {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.SELLING_DISABLED));
|
||||
p.sendMessage(messageRegistry.getMessage(Message.SELLING_DISABLED));
|
||||
plugin.debug("Selling is disabled");
|
||||
}
|
||||
}
|
||||
@ -465,8 +468,10 @@ public class ShopInteractListener implements Listener {
|
||||
private void create(final Player executor, final Location location, final ShopProduct product, final double buyPrice, final double sellPrice, final ShopType shopType) {
|
||||
plugin.debug(executor.getName() + " is creating new shop...");
|
||||
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
if (!executor.hasPermission(Permissions.CREATE)) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_CREATE));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_CREATE));
|
||||
plugin.debug(executor.getName() + " is not permitted to create the shop");
|
||||
return;
|
||||
}
|
||||
@ -478,7 +483,7 @@ public class ShopInteractListener implements Listener {
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (event.isCancelled() && !executor.hasPermission(Permissions.CREATE_PROTECTED)) {
|
||||
plugin.debug("Create event cancelled");
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_CREATE_PROTECTED));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_CREATE_PROTECTED));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -486,7 +491,7 @@ public class ShopInteractListener implements Listener {
|
||||
EconomyResponse r = plugin.getEconomy().withdrawPlayer(executor, location.getWorld().getName(), creationPrice);
|
||||
if (!r.transactionSuccess()) {
|
||||
plugin.debug("Economy transaction failed: " + r.errorMessage);
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -497,7 +502,7 @@ public class ShopInteractListener implements Listener {
|
||||
shopUtils.addShop(shop, true);
|
||||
|
||||
Message message = shopType == ShopType.ADMIN ? Message.ADMIN_SHOP_CREATED : Message.SHOP_CREATED;
|
||||
executor.sendMessage(LanguageUtils.getMessage(message, new Replacement(Placeholder.CREATION_PRICE, creationPrice)));
|
||||
executor.sendMessage(messageRegistry.getMessage(message, new Replacement(Placeholder.CREATION_PRICE, creationPrice)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -506,14 +511,16 @@ public class ShopInteractListener implements Listener {
|
||||
* @param shop Shop to be removed
|
||||
*/
|
||||
private void remove(Player executor, Shop shop) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
if (shop.getShopType() == ShopType.ADMIN && !executor.hasPermission(Permissions.REMOVE_ADMIN)) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_REMOVE_ADMIN));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_REMOVE_ADMIN));
|
||||
return;
|
||||
}
|
||||
|
||||
if (shop.getShopType() == ShopType.NORMAL && !executor.getUniqueId().equals(shop.getVendor().getUniqueId())
|
||||
&& !executor.hasPermission(Permissions.REMOVE_OTHER)) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_REMOVE_OTHERS));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_REMOVE_OTHERS));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -530,16 +537,16 @@ public class ShopInteractListener implements Listener {
|
||||
EconomyResponse r = plugin.getEconomy().depositPlayer(executor, shop.getLocation().getWorld().getName(), creationPrice);
|
||||
if (!r.transactionSuccess()) {
|
||||
plugin.debug("Economy transaction failed: " + r.errorMessage);
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED,
|
||||
new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
new Replacement(Placeholder.CREATION_PRICE, 0)));
|
||||
} else {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
new Replacement(Placeholder.CREATION_PRICE, creationPrice)));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.SHOP_REMOVED_REFUND,
|
||||
new Replacement(Placeholder.CREATION_PRICE, creationPrice)));
|
||||
}
|
||||
} else {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.SHOP_REMOVED));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.SHOP_REMOVED));
|
||||
}
|
||||
|
||||
shopUtils.removeShop(shop, true);
|
||||
@ -553,8 +560,10 @@ public class ShopInteractListener implements Listener {
|
||||
* @param message Whether the player should receive the {@link Message#OPENED_SHOP} message
|
||||
*/
|
||||
private void open(Player executor, Shop shop, boolean message) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
if (!executor.getUniqueId().equals(shop.getVendor().getUniqueId()) && !executor.hasPermission(Permissions.OPEN_OTHER)) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NO_PERMISSION_OPEN_OTHERS));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NO_PERMISSION_OPEN_OTHERS));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -568,7 +577,7 @@ public class ShopInteractListener implements Listener {
|
||||
|
||||
executor.openInventory(shop.getInventoryHolder().getInventory());
|
||||
plugin.debug("Opened shop (#" + shop.getID() + ")");
|
||||
if (message) executor.sendMessage(LanguageUtils.getMessage(Message.OPENED_SHOP,
|
||||
if (message) executor.sendMessage(messageRegistry.getMessage(Message.OPENED_SHOP,
|
||||
new Replacement(Placeholder.VENDOR, shop.getVendor().getName())));
|
||||
}
|
||||
|
||||
@ -578,6 +587,8 @@ public class ShopInteractListener implements Listener {
|
||||
* @param shop Shop from which the information will be retrieved
|
||||
*/
|
||||
private void info(Player executor, Shop shop) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(executor.getName() + " is retrieving shop info (#" + shop.getID() + ")");
|
||||
ShopInfoEvent event = new ShopInfoEvent(executor, shop);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
@ -595,32 +606,32 @@ public class ShopInteractListener implements Listener {
|
||||
String vendorName = (shop.getVendor().getName() == null ?
|
||||
shop.getVendor().getUniqueId().toString() : shop.getVendor().getName());
|
||||
|
||||
String vendorString = LanguageUtils.getMessage(Message.SHOP_INFO_VENDOR,
|
||||
String vendorString = messageRegistry.getMessage(Message.SHOP_INFO_VENDOR,
|
||||
new Replacement(Placeholder.VENDOR, vendorName));
|
||||
|
||||
// Make JSON message with item preview
|
||||
final ShopProduct product = shop.getProduct();
|
||||
Consumer<Player> productMessage = plugin.getPlatform().getTextComponentHelper().getSendableItemInfo(
|
||||
LanguageUtils.getMessage(Message.SHOP_INFO_PRODUCT,
|
||||
messageRegistry.getMessage(Message.SHOP_INFO_PRODUCT,
|
||||
new Replacement(Placeholder.AMOUNT, String.valueOf(product.getAmount()))),
|
||||
Placeholder.ITEM_NAME.toString(),
|
||||
product.getItemStack(),
|
||||
product.getLocalizedName()
|
||||
);
|
||||
|
||||
String disabled = LanguageUtils.getMessage(Message.SHOP_INFO_DISABLED);
|
||||
String disabled = messageRegistry.getMessage(Message.SHOP_INFO_DISABLED);
|
||||
|
||||
String priceString = LanguageUtils.getMessage(Message.SHOP_INFO_PRICE,
|
||||
String priceString = messageRegistry.getMessage(Message.SHOP_INFO_PRICE,
|
||||
new Replacement(Placeholder.BUY_PRICE, (shop.getBuyPrice() > 0 ? String.valueOf(shop.getBuyPrice()) : disabled)),
|
||||
new Replacement(Placeholder.SELL_PRICE, (shop.getSellPrice() > 0 ? String.valueOf(shop.getSellPrice()) : disabled)));
|
||||
|
||||
String shopType = LanguageUtils.getMessage(shop.getShopType() == ShopType.NORMAL ?
|
||||
String shopType = messageRegistry.getMessage(shop.getShopType() == ShopType.NORMAL ?
|
||||
Message.SHOP_INFO_NORMAL : Message.SHOP_INFO_ADMIN);
|
||||
|
||||
String stock = LanguageUtils.getMessage(Message.SHOP_INFO_STOCK,
|
||||
String stock = messageRegistry.getMessage(Message.SHOP_INFO_STOCK,
|
||||
new Replacement(Placeholder.STOCK, amount));
|
||||
|
||||
String chestSpace = LanguageUtils.getMessage(Message.SHOP_INFO_CHEST_SPACE,
|
||||
String chestSpace = messageRegistry.getMessage(Message.SHOP_INFO_CHEST_SPACE,
|
||||
new Replacement(Placeholder.CHEST_SPACE, space));
|
||||
|
||||
executor.sendMessage(" ");
|
||||
@ -640,6 +651,8 @@ public class ShopInteractListener implements Listener {
|
||||
* @param stack Whether a whole stack should be bought
|
||||
*/
|
||||
private void buy(Player executor, final Shop shop, boolean stack) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(executor.getName() + " is buying (#" + shop.getID() + ")");
|
||||
|
||||
ItemStack itemStack = shop.getProduct().getItemStack();
|
||||
@ -656,7 +669,7 @@ public class ShopInteractListener implements Listener {
|
||||
int amountForMoney = (int) (amount / price * econ.getBalance(executor, worldName));
|
||||
|
||||
if (amountForMoney == 0 && Config.autoCalculateItemAmount) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NOT_ENOUGH_MONEY));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NOT_ENOUGH_MONEY));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -668,7 +681,7 @@ public class ShopInteractListener implements Listener {
|
||||
int amountForChestItems = Utils.getAmount(c.getInventory(), itemStack);
|
||||
|
||||
if (amountForChestItems == 0 && shop.getShopType() != ShopType.ADMIN) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.OUT_OF_STOCK));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.OUT_OF_STOCK));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -680,7 +693,7 @@ public class ShopInteractListener implements Listener {
|
||||
int freeSpace = Utils.getFreeSpaceForItem(inventory, product);
|
||||
|
||||
if (freeSpace == 0) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NOT_ENOUGH_INVENTORY_SPACE));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NOT_ENOUGH_INVENTORY_SPACE));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -734,18 +747,18 @@ public class ShopInteractListener implements Listener {
|
||||
}.runTaskLater(plugin, 1L);
|
||||
|
||||
String vendorName = (shop.getVendor().getName() == null ? shop.getVendor().getUniqueId().toString() : shop.getVendor().getName());
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.BUY_SUCCESS, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.BUY_SUCCESS, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.BUY_PRICE, String.valueOf(newPrice)),
|
||||
new Replacement(Placeholder.VENDOR, vendorName)));
|
||||
|
||||
plugin.debug(executor.getName() + " successfully bought (#" + shop.getID() + ")");
|
||||
|
||||
if (shop.getVendor().isOnline() && Config.enableVendorMessages) {
|
||||
shop.getVendor().getPlayer().sendMessage(LanguageUtils.getMessage(Message.SOMEONE_BOUGHT, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
shop.getVendor().getPlayer().sendMessage(messageRegistry.getMessage(Message.SOMEONE_BOUGHT, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.BUY_PRICE, String.valueOf(newPrice)),
|
||||
new Replacement(Placeholder.PLAYER, executor.getName())));
|
||||
} else if(!shop.getVendor().isOnline() && Config.enableVendorBungeeMessages){
|
||||
String message = LanguageUtils.getMessage( Message.SOMEONE_BOUGHT, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
String message = messageRegistry.getMessage(Message.SOMEONE_BOUGHT, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.BUY_PRICE, String.valueOf(newPrice)),
|
||||
new Replacement(Placeholder.PLAYER, executor.getName()));
|
||||
sendBungeeMessage(shop.getVendor().getName(),message);
|
||||
@ -753,7 +766,7 @@ public class ShopInteractListener implements Listener {
|
||||
|
||||
} else {
|
||||
plugin.debug("Economy transaction failed (r2): " + r2.errorMessage + " (#" + shop.getID() + ")");
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r2.errorMessage)));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r2.errorMessage)));
|
||||
econ.withdrawPlayer(shop.getVendor(), worldName, newPrice);
|
||||
econ.depositPlayer(executor, worldName, newPrice);
|
||||
}
|
||||
@ -781,21 +794,21 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
}.runTaskLater(plugin, 1L);
|
||||
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.BUY_SUCCESS_ADMIN, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.BUY_SUCCESS_ADMIN, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.BUY_PRICE, String.valueOf(newPrice))));
|
||||
|
||||
plugin.debug(executor.getName() + " successfully bought (#" + shop.getID() + ")");
|
||||
}
|
||||
} else {
|
||||
plugin.debug("Economy transaction failed (r): " + r.errorMessage + " (#" + shop.getID() + ")");
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
econ.depositPlayer(executor, worldName, newPrice);
|
||||
}
|
||||
} else {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NOT_ENOUGH_INVENTORY_SPACE));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NOT_ENOUGH_INVENTORY_SPACE));
|
||||
}
|
||||
} else {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NOT_ENOUGH_MONEY));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NOT_ENOUGH_MONEY));
|
||||
}
|
||||
}
|
||||
|
||||
@ -805,6 +818,8 @@ public class ShopInteractListener implements Listener {
|
||||
* @param shop Shop, to which the player sells
|
||||
*/
|
||||
private void sell(Player executor, final Shop shop, boolean stack) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
|
||||
plugin.debug(executor.getName() + " is selling (#" + shop.getID() + ")");
|
||||
|
||||
ItemStack itemStack = shop.getProduct().getItemStack();
|
||||
@ -826,7 +841,7 @@ public class ShopInteractListener implements Listener {
|
||||
plugin.debug("Vendor has enough money for " + amountForMoney + " item(s) (#" + shop.getID() + ")");
|
||||
|
||||
if (amountForMoney == 0 && Config.autoCalculateItemAmount && shop.getShopType() != ShopType.ADMIN) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.VENDOR_NOT_ENOUGH_MONEY));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.VENDOR_NOT_ENOUGH_MONEY));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -836,7 +851,7 @@ public class ShopInteractListener implements Listener {
|
||||
int amountForItemCount = Utils.getAmount(executor.getInventory(), itemStack);
|
||||
|
||||
if (amountForItemCount == 0) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.NOT_ENOUGH_ITEMS));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.NOT_ENOUGH_ITEMS));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -848,7 +863,7 @@ public class ShopInteractListener implements Listener {
|
||||
int freeSpace = Utils.getFreeSpaceForItem(inventory, product);
|
||||
|
||||
if (freeSpace == 0 && shop.getShopType() != ShopType.ADMIN) {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.CHEST_NOT_ENOUGH_INVENTORY_SPACE));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.CHEST_NOT_ENOUGH_INVENTORY_SPACE));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -902,18 +917,18 @@ public class ShopInteractListener implements Listener {
|
||||
}.runTaskLater(plugin, 1L);
|
||||
|
||||
String vendorName = (shop.getVendor().getName() == null ? shop.getVendor().getUniqueId().toString() : shop.getVendor().getName());
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.SELL_SUCCESS, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.SELL_SUCCESS, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.SELL_PRICE, String.valueOf(newPrice)),
|
||||
new Replacement(Placeholder.VENDOR, vendorName)));
|
||||
|
||||
plugin.debug(executor.getName() + " successfully sold (#" + shop.getID() + ")");
|
||||
|
||||
if (shop.getVendor().isOnline() && Config.enableVendorMessages) {
|
||||
shop.getVendor().getPlayer().sendMessage(LanguageUtils.getMessage(Message.SOMEONE_SOLD, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
shop.getVendor().getPlayer().sendMessage(messageRegistry.getMessage(Message.SOMEONE_SOLD, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.SELL_PRICE, String.valueOf(newPrice)),
|
||||
new Replacement(Placeholder.PLAYER, executor.getName())));
|
||||
} else if(!shop.getVendor().isOnline() && Config.enableVendorBungeeMessages){
|
||||
String message = LanguageUtils.getMessage( Message.SOMEONE_SOLD, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
String message = messageRegistry.getMessage(Message.SOMEONE_SOLD, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.SELL_PRICE, String.valueOf(newPrice)),
|
||||
new Replacement(Placeholder.PLAYER, executor.getName()));
|
||||
sendBungeeMessage(shop.getVendor().getName(),message);
|
||||
@ -921,7 +936,7 @@ public class ShopInteractListener implements Listener {
|
||||
|
||||
} else {
|
||||
plugin.debug("Economy transaction failed (r2): " + r2.errorMessage + " (#" + shop.getID() + ")");
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r2.errorMessage)));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r2.errorMessage)));
|
||||
econ.withdrawPlayer(executor, worldName, newPrice);
|
||||
econ.depositPlayer(shop.getVendor(), worldName, newPrice);
|
||||
}
|
||||
@ -950,7 +965,7 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
}.runTaskLater(plugin, 1L);
|
||||
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.SELL_SUCCESS_ADMIN, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.SELL_SUCCESS_ADMIN, new Replacement(Placeholder.AMOUNT, String.valueOf(newAmount)),
|
||||
new Replacement(Placeholder.ITEM_NAME, newProduct.getLocalizedName()), new Replacement(Placeholder.SELL_PRICE, String.valueOf(newPrice))));
|
||||
|
||||
plugin.debug(executor.getName() + " successfully sold (#" + shop.getID() + ")");
|
||||
@ -958,16 +973,16 @@ public class ShopInteractListener implements Listener {
|
||||
|
||||
} else {
|
||||
plugin.debug("Economy transaction failed (r): " + r.errorMessage + " (#" + shop.getID() + ")");
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.ERROR_OCCURRED, new Replacement(Placeholder.ERROR, r.errorMessage)));
|
||||
econ.withdrawPlayer(executor, worldName, newPrice);
|
||||
}
|
||||
|
||||
} else {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.CHEST_NOT_ENOUGH_INVENTORY_SPACE));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.CHEST_NOT_ENOUGH_INVENTORY_SPACE));
|
||||
}
|
||||
|
||||
} else {
|
||||
executor.sendMessage(LanguageUtils.getMessage(Message.VENDOR_NOT_ENOUGH_MONEY));
|
||||
executor.sendMessage(messageRegistry.getMessage(Message.VENDOR_NOT_ENOUGH_MONEY));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,14 @@
|
||||
package de.epiceric.shopchest.shop;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.config.hologram.HologramFormat;
|
||||
import de.epiceric.shopchest.exceptions.ChestNotFoundException;
|
||||
import de.epiceric.shopchest.exceptions.NotEnoughSpaceException;
|
||||
import de.epiceric.shopchest.nms.Hologram;
|
||||
import de.epiceric.shopchest.utils.ItemUtils;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
@ -20,16 +24,10 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Config;
|
||||
import de.epiceric.shopchest.config.hologram.HologramFormat;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.exceptions.ChestNotFoundException;
|
||||
import de.epiceric.shopchest.exceptions.NotEnoughSpaceException;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.nms.Hologram;
|
||||
import de.epiceric.shopchest.utils.ItemUtils;
|
||||
import de.epiceric.shopchest.utils.Utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Shop {
|
||||
|
||||
@ -267,7 +265,8 @@ public class Shop {
|
||||
requirements.put(HologramFormat.Requirement.AMOUNT, getProduct().getAmount());
|
||||
requirements.put(HologramFormat.Requirement.ITEM_TYPE, itemStack.getType() + (itemStack.getDurability() > 0 ? ":" + itemStack.getDurability() : ""));
|
||||
requirements.put(HologramFormat.Requirement.ITEM_NAME, itemStack.hasItemMeta() ? itemStack.getItemMeta().getDisplayName() : null);
|
||||
requirements.put(HologramFormat.Requirement.HAS_ENCHANTMENT, !LanguageUtils.getEnchantmentString(ItemUtils.getEnchantments(itemStack)).isEmpty());
|
||||
//TODO Link it
|
||||
//requirements.put(HologramFormat.Requirement.HAS_ENCHANTMENT, !LanguageUtils.getEnchantmentString(ItemUtils.getEnchantments(itemStack)).isEmpty());
|
||||
requirements.put(HologramFormat.Requirement.BUY_PRICE, getBuyPrice());
|
||||
requirements.put(HologramFormat.Requirement.SELL_PRICE, getSellPrice());
|
||||
requirements.put(HologramFormat.Requirement.HAS_POTION_EFFECT, ItemUtils.getPotionEffect(itemStack) != null);
|
||||
@ -287,13 +286,17 @@ public class Shop {
|
||||
placeholders.put(Placeholder.VENDOR, getVendor().getName());
|
||||
placeholders.put(Placeholder.AMOUNT, getProduct().getAmount());
|
||||
placeholders.put(Placeholder.ITEM_NAME, getProduct().getLocalizedName());
|
||||
placeholders.put(Placeholder.ENCHANTMENT, LanguageUtils.getEnchantmentString(ItemUtils.getEnchantments(itemStack)));
|
||||
//TODO Link it
|
||||
//placeholders.put(Placeholder.ENCHANTMENT, LanguageUtils.getEnchantmentString(ItemUtils.getEnchantments(itemStack)));
|
||||
placeholders.put(Placeholder.BUY_PRICE, getBuyPrice());
|
||||
placeholders.put(Placeholder.SELL_PRICE, getSellPrice());
|
||||
//TODO Link it
|
||||
/*
|
||||
placeholders.put(Placeholder.POTION_EFFECT, LanguageUtils.getPotionEffectName(itemStack));
|
||||
placeholders.put(Placeholder.MUSIC_TITLE, LanguageUtils.getMusicDiscName(itemStack.getType()));
|
||||
placeholders.put(Placeholder.BANNER_PATTERN_NAME, LanguageUtils.getBannerPatternName(itemStack.getType()));
|
||||
placeholders.put(Placeholder.GENERATION, LanguageUtils.getBookGenerationName(itemStack));
|
||||
*/
|
||||
placeholders.put(Placeholder.STOCK, Utils.getAmount(inventory, itemStack));
|
||||
placeholders.put(Placeholder.MAX_STACK, itemStack.getMaxStackSize());
|
||||
placeholders.put(Placeholder.CHEST_SPACE, Utils.getFreeSpaceForItem(inventory, itemStack));
|
||||
|
@ -2,8 +2,6 @@ package de.epiceric.shopchest.shop;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
|
||||
public class ShopProduct {
|
||||
|
||||
private final ItemStack itemStack;
|
||||
@ -23,7 +21,8 @@ public class ShopProduct {
|
||||
* @return The localized name of the product's {@link ItemStack} in the selected language file.
|
||||
*/
|
||||
public String getLocalizedName() {
|
||||
return LanguageUtils.getItemName(getItemStack());
|
||||
// TODO Link it to the current language implementation
|
||||
return "";//LanguageUtils.getItemName(getItemStack());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,8 +2,8 @@ package de.epiceric.shopchest.utils;
|
||||
|
||||
import de.epiceric.shopchest.ShopChest;
|
||||
import de.epiceric.shopchest.config.Placeholder;
|
||||
import de.epiceric.shopchest.language.LanguageUtils;
|
||||
import de.epiceric.shopchest.language.Message;
|
||||
import de.epiceric.shopchest.language.MessageRegistry;
|
||||
import de.epiceric.shopchest.language.Replacement;
|
||||
import de.epiceric.shopchest.nms.CustomBookMeta;
|
||||
import de.epiceric.shopchest.shop.Shop;
|
||||
@ -301,11 +301,12 @@ public class Utils {
|
||||
* @param p The player to receive the notification
|
||||
*/
|
||||
public static void sendUpdateMessage(ShopChest plugin, Player p) {
|
||||
final MessageRegistry messageRegistry = plugin.getLanguageManager().getMessageRegistry();
|
||||
plugin.getPlatform().getTextComponentHelper().sendUpdateMessage(
|
||||
p,
|
||||
LanguageUtils.getMessage(Message.UPDATE_AVAILABLE,
|
||||
messageRegistry.getMessage(Message.UPDATE_AVAILABLE,
|
||||
new Replacement(Placeholder.VERSION, plugin.getLatestVersion())),
|
||||
LanguageUtils.getMessage(Message.UPDATE_CLICK_TO_DOWNLOAD),
|
||||
messageRegistry.getMessage(Message.UPDATE_CLICK_TO_DOWNLOAD),
|
||||
plugin.getDownloadLink()
|
||||
);
|
||||
}
|
||||
|
@ -1,919 +0,0 @@
|
||||
message.shop-created=&6Dir wurden &c%CREATION-PRICE% &6abgenommen, um diesen Shop zu erstellen.
|
||||
message.admin-shop-created=&6Dir wurden &c%CREATION-PRICE% &6abgenommen, um diesen Admin Shop zu erstellen.
|
||||
message.chest-already-shop=&cTruhe ist bereits ein Shop.
|
||||
message.chest-blocked=&cÜber der Truhe ist kein Platz.
|
||||
message.double-chest-blocked=&cÜber der Truhe ist kein Platz.
|
||||
message.shop-removed=&6Shop entfernt.
|
||||
message.shop-removed-refund=&6Shop entfernt. Dir wurden &c%CREATION-PRICE%&6 erstattet.
|
||||
message.all-shops-removed=&6Alle (&c%AMOUNT%&6) Shops von &c%VENDOR%&6 wurden entfernt.
|
||||
message.chest-no-shop=&cTruhe ist kein Shop.
|
||||
message.shop-create-not-enough-money=&cNicht genug Geld. Du brauchst &6%CREATION-PRICE% &cum einen Shop zu erstellen.
|
||||
message.shopInfo.vendor=&6Verkäufer: &e%VENDOR%
|
||||
message.shopInfo.product=&6Produkt: &e%AMOUNT% x %ITEMNAME%
|
||||
message.shopInfo.stock=&6Auf Lager: &e%STOCK%
|
||||
message.shopInfo.chest-space=&6Platz in Truhe: &e%CHEST-SPACE%
|
||||
message.shopInfo.price=&6Preis: Kauf: &e%BUY-PRICE%&6 Verkauf: &e%SELL-PRICE%
|
||||
message.shopInfo.disabled=&7Deaktiviert
|
||||
message.shopInfo.is-normal=&6Typ: &eNormal
|
||||
message.shopInfo.is-admin=&6Typ: &eAdmin
|
||||
message.buy-and-sell-disabled=&cDu kannst keinen Shop ohne Kauf- und Verkaufspreis erstellen.
|
||||
message.buy-success=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%BUY-PRICE%&a von &6%VENDOR% &agekauft.
|
||||
message.buy-success-admin=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%BUY-PRICE% &agekauft.
|
||||
message.sell-success=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%SELL-PRICE%&a an &6%VENDOR% &averkauft.
|
||||
message.sell-success-admin=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%SELL-PRICE% &averkauft.
|
||||
message.someone-bought=&6%PLAYER% &ahat &6%AMOUNT% x %ITEMNAME%&a für &6%BUY-PRICE%&a von deinem Shop gekauft.
|
||||
message.someone-sold=&6%PLAYER% &ahat &6%AMOUNT% x %ITEMNAME%&a für &6%SELL-PRICE%&a an deinen Shop verkauft.
|
||||
message.revenue-while-offline=&6Während du offline warst, haben deine Shops einen Umsatz von &c%REVENUE%&6 gemacht.
|
||||
message.not-enough-inventory-space=&cNicht genug Platz im Inventar.
|
||||
message.chest-not-enough-inventory-space=&cShop ist voll.
|
||||
message.not-enough-money=&cNicht genug Geld.
|
||||
message.not-enough-items=&cNicht genug Items.
|
||||
message.vendor-not-enough-money=&cVerkäufer hat nicht genug Geld.
|
||||
message.out-of-stock=&cShop ausverkauft.
|
||||
message.vendor-out-of-stock=&cDein Shop, der &6%AMOUNT% x %ITEMNAME% &cverkauft, ist ausverkauft.
|
||||
message.error-occurred=&cEin Fehler ist aufgetreten: %ERROR%
|
||||
message.amount-and-price-not-number=&cAnzahl und Preise müssen Zahlen sein.
|
||||
message.amount-is-zero=&cAnzahl muss größer als 0 sein.
|
||||
message.prices-contain-decimals=&cPreise dürfen keine Dezimalen enthalten.
|
||||
message.no-item-in-hand=&cKein Item in der Hand.
|
||||
message.click-chest-to-create-shop=&aKlicke innerhalb von 15 Sekunden auf eine Truhe, um einen Shop zu erstellen.
|
||||
message.click-chest-to-remove-shop=&aKlicke innerhalb von 15 Sekunden auf einen Shop, um ihn zu entfernen.
|
||||
message.click-chest-for-info=&aKlicke innerhalb von 15 Sekunden auf einen Shop, um Informationen über ihn zu bekommen.
|
||||
message.click-chest-to-open-shop=&Klicke innerhalb von 15 Sekunden auf einen Shop, um ihn zu öffnen.
|
||||
message.click-to-confirm=&aKlicke noch einmal zum Bestätigen.
|
||||
message.opened-shop=&aDu hast &6%VENDOR%&as Shop geöffnet.
|
||||
message.cannot-break-shop=&cDu kannst einen Shop nicht zerstören.
|
||||
message.cannot-sell-broken-item=&cDu kannst kein kaputtes Artikel verkaufen.
|
||||
message.buy-price-too-low=&cDer Kaufpreis muss höher sein als %MIN-PRICE%.
|
||||
message.sell-price-too-low=&cDer Verkaufspreis muss höher sein als %MIN-PRICE%.
|
||||
message.buy-price-too-high=&cDer Kaufpreis muss geringer sein als %MAX-PRICE%.
|
||||
message.sell-price-too-high=&cDer Verkaufspreis muss geringer sein als %MAX-PRICE%.
|
||||
message.buying-disabled=&cKaufen ist an diesem Shop nicht möglich.
|
||||
message.selling-disabled=&cVerkaufen ist an diesem Shop nicht möglich.
|
||||
message.reloaded-shops=&a%AMOUNT% Shop/s wurden erfolgreich neu geladen.
|
||||
message.shop-limit-reached=&cDu hast dein Limit von &6%LIMIT% &cShop/s erreicht.
|
||||
message.occupied-shop-slots=&6Du hast &c%AMOUNT%/%LIMIT% &6Shop Slot/s benutzt.
|
||||
message.cannot-sell-item=&cDu kannst für diesen Artikel keinen Shop erstellen.
|
||||
message.use-in-creative=&cDu kannst im Kreativ-Modus keine Shops benutzen.
|
||||
message.select-item=&aÖffne dein Inventar und lass ein Item fallen, um es auszuwählen.
|
||||
message.item-selected=&aItem wurde ausgewählt: &6%ITEMNAME%
|
||||
message.creation-cancelled=&cShoperstellung wurde abgebrochen.
|
||||
message.update.update-available=&6&lVersion &c&l%VERSION% &6&lvon &c&lShopChest &6&list verfügbar.
|
||||
message.update.click-to-download=Klicke hier zum Herunterladen
|
||||
message.update.no-update=&6&lKeine neue Aktualisierung verfügbar.
|
||||
message.update.checking=&6&lSuche nach Aktualisierungen...
|
||||
message.update.error=&c&lFehler beim Suchen nach Aktualisierungen.
|
||||
message.noPermission.create=&cDu hast keine Berechtigung einen Shop zu erstellen.
|
||||
message.noPermission.create-admin=&cDu hast keine Berechtigung einen Admin-Shop zu erstellen.
|
||||
message.noPermission.create-protected=&cDu hast keine Berechtigung hier einen Shop zu erstellen.
|
||||
message.noPermission.open-others=&cDu hast keine Berechtigung diesen Shop zu öffnen.
|
||||
message.noPermission.buy=&cDu hast keine Berechtigung etwas zu kaufen.
|
||||
message.noPermission.sell=&cDu hast keine Berechtigung etwas zu verkaufen.
|
||||
message.noPermission.buy-here=&cDu hast keine Berechtigung hier etwas zu kaufen.
|
||||
message.noPermission.sell-here=&cDu hast keine Berechtigung hier etwas zu verkaufen.
|
||||
message.noPermission.remove-others=&cDu hast keine Berechtigung diesen Shop zu entfernen.
|
||||
message.noPermission.remove-admin=&cDu hast keine Berechtigung einen Admin Shop zu entfernen.
|
||||
message.noPermission.reload=&cDu hast keine Berechtigung die Shops neu zu laden.
|
||||
message.noPermission.update=&cDu hast keine Berechtigung nach Aktualisierungen zu suchen.
|
||||
message.noPermission.config=&cDu hast keine Berechtigung Konfigurationswerte zu verändern.
|
||||
message.noPermission.extend-others=&cDu hast keine Berechtigung diesen Shop zu erweitern.
|
||||
message.noPermission.extend-protected=&cDu hast keine Berechtigung diesen Shop nach hier zu erweitern.
|
||||
message.commandDescription.header=&6==== &c/%COMMAND% &6Hilfe
|
||||
message.commandDescription.footer=&6==== Ende
|
||||
message.commandDescription.create=&a/%COMMAND% create <amount> <buy-price> <sell-price> - Erstelle einen Shop.
|
||||
message.commandDescription.create-admin=&a/%COMMAND% create <amount> <buy-price> <sell-price> [admin] - Erstelle einen Shop.
|
||||
message.commandDescription.remove=&a/%COMMAND% remove - Entferne einen Shop.
|
||||
message.commandDescription.info=&a/%COMMAND% info - Rufe Informationen über den Shop ab.
|
||||
message.commandDescription.removeall=&a/%COMMAND% removeall - Entferne alle Shops eines Spielers.
|
||||
message.commandDescription.reload=&a/%COMMAND% reload - Lade die Shops neu.
|
||||
message.commandDescription.update=&a/%COMMAND% update - Suche nach Aktualisierungen.
|
||||
message.commandDescription.limits=&a/%COMMAND% limits - Betrachte die Shop Limits.
|
||||
message.commandDescription.open=&a/%COMMAND% open - Öffne einen Shop.
|
||||
message.commandDescription.config=&a/%COMMAND% config <set|add|remove> <property> <value> - Verändere Konfigurationswerte.
|
||||
message.config.set=&6Eigenschaft &a%PROPERTY% &6wurde auf &a%VALUE% &6gesetzt.
|
||||
message.config.added=&6Wert &a%VALUE% &6wurde zu &a%PROPERTY% &6hinzugefügt.
|
||||
message.config.removed=&6Wert &a%VALUE% &6wurde aus &a%PROPERTY% &6entfernt.
|
||||
|
||||
book.generation.0=Original
|
||||
book.generation.1=Kopie des Originals
|
||||
book.generation.2=Kopie einer Kopie
|
||||
book.generation.3=Zerrissen
|
||||
effect.damageBoost=Stärke
|
||||
effect.fireResistance=Feuerschutz
|
||||
effect.harm=Direktschaden
|
||||
effect.heal=Direktheilung
|
||||
effect.invisibility=Unsichtbarkeit
|
||||
effect.jump=Sprungkraft
|
||||
effect.luck=Glück
|
||||
effect.moveSlowdown=Langsamkeit
|
||||
effect.moveSpeed=Schnelligkeit
|
||||
effect.nightVision=Nachtsicht
|
||||
effect.poison=Vergiftung
|
||||
effect.regeneration=Regeneration
|
||||
effect.waterBreathing=Unterwasseratem
|
||||
effect.weakness=Schwäche
|
||||
enchantment.arrowDamage=Stärke
|
||||
enchantment.arrowFire=Flamme
|
||||
enchantment.arrowInfinite=Unendlich
|
||||
enchantment.arrowKnockback=Schlag
|
||||
enchantment.binding_curse=Fluch der Bindung
|
||||
enchantment.damage.all=Schärfe
|
||||
enchantment.damage.arthropods=Nemesis der Gliederfüßer
|
||||
enchantment.damage.undead=Bann
|
||||
enchantment.digging=Effizienz
|
||||
enchantment.durability=Haltbarkeit
|
||||
enchantment.fire=Verbrennung
|
||||
enchantment.fishingSpeed=Köder
|
||||
enchantment.frostWalker=Eisläufer
|
||||
enchantment.knockback=Rückstoß
|
||||
enchantment.level.1=I
|
||||
enchantment.level.10=X
|
||||
enchantment.level.2=II
|
||||
enchantment.level.3=III
|
||||
enchantment.level.4=IV
|
||||
enchantment.level.5=V
|
||||
enchantment.level.6=VI
|
||||
enchantment.level.7=VII
|
||||
enchantment.level.8=VIII
|
||||
enchantment.level.9=IX
|
||||
enchantment.lootBonus=Plünderung
|
||||
enchantment.lootBonusDigger=Glück
|
||||
enchantment.lootBonusFishing=Glück des Meeres
|
||||
enchantment.mending=Reparatur
|
||||
enchantment.oxygen=Atmung
|
||||
enchantment.protect.all=Schutz
|
||||
enchantment.protect.explosion=Explosionsschutz
|
||||
enchantment.protect.fall=Federfall
|
||||
enchantment.protect.fire=Feuerschutz
|
||||
enchantment.protect.projectile=Schusssicher
|
||||
enchantment.sweeping=Schwungkraft
|
||||
enchantment.thorns=Dornen
|
||||
enchantment.untouching=Behutsamkeit
|
||||
enchantment.vanishing_curse=Fluch des Verschwindens
|
||||
enchantment.waterWalker=Wasserläufer
|
||||
enchantment.waterWorker=Wasseraffinität
|
||||
entity.Bat.name=Fledermaus
|
||||
entity.Blaze.name=Lohe
|
||||
entity.CaveSpider.name=Höhlenspinne
|
||||
entity.Chicken.name=Huhn
|
||||
entity.Cow.name=Kuh
|
||||
entity.Creeper.name=Creeper
|
||||
entity.Donkey.name=Esel
|
||||
entity.ElderGuardian.name=Großer Wächter
|
||||
entity.Enderman.name=Enderman
|
||||
entity.Endermite.name=Endermite
|
||||
entity.EntityHorse.name=Pferd
|
||||
entity.EvocationIllager.name=Magier
|
||||
entity.Ghast.name=Ghast
|
||||
entity.Guardian.name=Wächter
|
||||
entity.Horse.name=Pferd
|
||||
entity.Husk.name=Wüstenzombie
|
||||
entity.IllusionIllager.name=Illusionist
|
||||
entity.LavaSlime.name=Magmawürfel
|
||||
entity.Llama.name=Lama
|
||||
entity.Mule.name=Maultier
|
||||
entity.MushroomCow.name=Mooshroom
|
||||
entity.Ozelot.name=Ozelot
|
||||
entity.Parrot.name=Papagei
|
||||
entity.Pig.name=Schwein
|
||||
entity.PigZombie.name=Schweinezombie
|
||||
entity.PolarBear.name=Eisbär
|
||||
entity.Rabbit.name=Kaninchen
|
||||
entity.Sheep.name=Schaf
|
||||
entity.Shulker.name=Shulker
|
||||
entity.Silverfish.name=Silberfischchen
|
||||
entity.Skeleton.name=Skelett
|
||||
entity.SkeletonHorse.name=Skelettpferd
|
||||
entity.Slime.name=Schleim
|
||||
entity.Spider.name=Spinne
|
||||
entity.Squid.name=Tintenfisch
|
||||
entity.Stray.name=Eiswanderer
|
||||
entity.Vex.name=Plagegeist
|
||||
entity.Villager.name=Dorfbewohner
|
||||
entity.VindicationIllager.name=Diener
|
||||
entity.Witch.name=Hexe
|
||||
entity.WitherSkeleton.name=Witherskelett
|
||||
entity.Wolf.name=Wolf
|
||||
entity.Zombie.name=Zombie
|
||||
entity.ZombieHorse.name=Zombiepferd
|
||||
entity.ZombieVillager.name=Dorfbewohnerzombie
|
||||
item.apple.name=Apfel
|
||||
item.appleGold.name=Goldener Apfel
|
||||
item.armorStand.name=Rüstungsständer
|
||||
item.arrow.name=Pfeil
|
||||
item.banner.black.name=Schwarzes Banner
|
||||
item.banner.blue.name=Blaues Banner
|
||||
item.banner.brown.name=Braunes Banner
|
||||
item.banner.cyan.name=Türkises Banner
|
||||
item.banner.gray.name=Graues Banner
|
||||
item.banner.green.name=Grünes Banner
|
||||
item.banner.lightBlue.name=Hellblaues Banner
|
||||
item.banner.lime.name=Hellgrünes Banner
|
||||
item.banner.magenta.name=Magenta Banner
|
||||
item.banner.orange.name=Oranges Banner
|
||||
item.banner.pink.name=Rosa Banner
|
||||
item.banner.purple.name=Violettes Banner
|
||||
item.banner.red.name=Rotes Banner
|
||||
item.banner.silver.name=Hellgraues Banner
|
||||
item.banner.white.name=Weißes Banner
|
||||
item.banner.yellow.name=Gelbes Banner
|
||||
item.bed.black.name=Schwarzes Bett
|
||||
item.bed.blue.name=Blaues Bett
|
||||
item.bed.brown.name=Braunes Bett
|
||||
item.bed.cyan.name=Türkises Bett
|
||||
item.bed.gray.name=Graues Bett
|
||||
item.bed.green.name=Grünes Bett
|
||||
item.bed.lightBlue.name=Hellblaues Bett
|
||||
item.bed.lime.name=Hellgrünes Bett
|
||||
item.bed.magenta.name=Magenta Bett
|
||||
item.bed.name=Bett
|
||||
item.bed.orange.name=Oranges Bett
|
||||
item.bed.pink.name=Rosa Bett
|
||||
item.bed.purple.name=Violettes Bett
|
||||
item.bed.red.name=Rotes Bett
|
||||
item.bed.silver.name=Hellgraues Bett
|
||||
item.bed.white.name=Weißes Bett
|
||||
item.bed.yellow.name=Gelbes Bett
|
||||
item.beefCooked.name=Steak
|
||||
item.beefRaw.name=Rohes Rindfleisch
|
||||
item.beetroot.name=Rote Bete
|
||||
item.beetroot_seeds.name=Rote-Bete-Samen
|
||||
item.beetroot_soup.name=Borschtsch
|
||||
item.blazePowder.name=Lohenstaub
|
||||
item.blazeRod.name=Lohenrute
|
||||
item.boat.acacia.name=Akazienholzboot
|
||||
item.boat.birch.name=Birkenholzboot
|
||||
item.boat.dark_oak.name=Schwarzeichenholzboot
|
||||
item.boat.jungle.name=Tropenholzboot
|
||||
item.boat.oak.name=Eichenholzboot
|
||||
item.boat.spruce.name=Fichtenholzboot
|
||||
item.bone.name=Knochen
|
||||
item.book.name=Buch
|
||||
item.bootsChain.name=Kettenstiefel
|
||||
item.bootsCloth.name=Lederstiefel
|
||||
item.bootsDiamond.name=Diamantstiefel
|
||||
item.bootsGold.name=Goldstiefel
|
||||
item.bootsIron.name=Eisenstiefel
|
||||
item.bow.name=Bogen
|
||||
item.bowl.name=Schüssel
|
||||
item.bread.name=Brot
|
||||
item.brewingStand.name=Braustand
|
||||
item.brick.name=Ziegel
|
||||
item.bucket.name=Eimer
|
||||
item.bucketLava.name=Lavaeimer
|
||||
item.bucketWater.name=Wassereimer
|
||||
item.cake.name=Kuchen
|
||||
item.carrotGolden.name=Goldene Karotte
|
||||
item.carrotOnAStick.name=Karottenrute
|
||||
item.carrots.name=Karotte
|
||||
item.cauldron.name=Kessel
|
||||
item.charcoal.name=Holzkohle
|
||||
item.chestplateChain.name=Kettenhemd
|
||||
item.chestplateCloth.name=Lederjacke
|
||||
item.chestplateDiamond.name=Diamantharnisch
|
||||
item.chestplateGold.name=Goldharnisch
|
||||
item.chestplateIron.name=Eisenharnisch
|
||||
item.chickenCooked.name=Gebratenes Hühnchen
|
||||
item.chickenRaw.name=Rohes Hühnchen
|
||||
item.chorusFruit.name=Chorusfrucht
|
||||
item.chorusFruitPopped.name=Geplatzte Chorusfrucht
|
||||
item.clay.name=Tonklumpen
|
||||
item.clock.name=Uhr
|
||||
item.coal.name=Kohle
|
||||
item.comparator.name=Redstone-Komparator
|
||||
item.compass.name=Kompass
|
||||
item.cookie.name=Keks
|
||||
item.diamond.name=Diamant
|
||||
item.diode.name=Redstone-Verstärker
|
||||
item.doorAcacia.name=Akazienholztür
|
||||
item.doorBirch.name=Birkenholztür
|
||||
item.doorDarkOak.name=Schwarzeichenholztür
|
||||
item.doorIron.name=Eisentür
|
||||
item.doorJungle.name=Tropenholztür
|
||||
item.doorOak.name=Eichenholztür
|
||||
item.doorSpruce.name=Fichtenholztür
|
||||
item.dragon_breath.name=Drachenatem
|
||||
item.dyePowder.black.name=Tintenbeutel
|
||||
item.dyePowder.blue.name=Lapislazuli
|
||||
item.dyePowder.brown.name=Kakaobohnen
|
||||
item.dyePowder.cyan.name=Türkiser Farbstoff
|
||||
item.dyePowder.gray.name=Grauer Farbstoff
|
||||
item.dyePowder.green.name=Kaktusgrün
|
||||
item.dyePowder.lightBlue.name=Hellblauer Farbstoff
|
||||
item.dyePowder.lime.name=Hellgrüner Farbstoff
|
||||
item.dyePowder.magenta.name=Magenta Farbstoff
|
||||
item.dyePowder.orange.name=Oranger Farbstoff
|
||||
item.dyePowder.pink.name=Rosa Farbstoff
|
||||
item.dyePowder.purple.name=Violetter Farbstoff
|
||||
item.dyePowder.red.name=Roter Farbstoff
|
||||
item.dyePowder.silver.name=Hellgrauer Farbstoff
|
||||
item.dyePowder.white.name=Knochenmehl
|
||||
item.dyePowder.yellow.name=Gelber Farbstoff
|
||||
item.egg.name=Ei
|
||||
item.elytra.name=Elytren
|
||||
item.emerald.name=Smaragd
|
||||
item.emptyMap.name=Leere Karte
|
||||
item.enchantedBook.name=Verzaubertes Buch
|
||||
item.end_crystal.name=Enderkristall
|
||||
item.enderPearl.name=Enderperle
|
||||
item.expBottle.name=Erfahrungsfläschchen
|
||||
item.eyeOfEnder.name=Enderauge
|
||||
item.feather.name=Feder
|
||||
item.fermentedSpiderEye.name=Fermentiertes Spinnenauge
|
||||
item.fireball.name=Feuerkugel
|
||||
item.fireworks.name=Feuerwerksrakete
|
||||
item.fireworksCharge.name=Feuerwerksstern
|
||||
item.fish.clownfish.raw.name=Clownfisch
|
||||
item.fish.cod.cooked.name=Gebratener Kabeljau
|
||||
item.fish.cod.raw.name=Roher Kabeljau
|
||||
item.fish.pufferfish.raw.name=Kugelfisch
|
||||
item.fish.salmon.cooked.name=Gebratener Lachs
|
||||
item.fish.salmon.raw.name=Roher Lachs
|
||||
item.fishingRod.name=Angel
|
||||
item.flint.name=Feuerstein
|
||||
item.flintAndSteel.name=Feuerzeug
|
||||
item.flowerPot.name=Blumentopf
|
||||
item.frame.name=Rahmen
|
||||
item.ghastTear.name=Ghastträne
|
||||
item.glassBottle.name=Glasflasche
|
||||
item.goldNugget.name=Goldklumpen
|
||||
item.hatchetDiamond.name=Diamantaxt
|
||||
item.hatchetGold.name=Goldaxt
|
||||
item.hatchetIron.name=Eisenaxt
|
||||
item.hatchetStone.name=Steinaxt
|
||||
item.hatchetWood.name=Holzaxt
|
||||
item.helmetChain.name=Kettenhaube
|
||||
item.helmetCloth.name=Lederkappe
|
||||
item.helmetDiamond.name=Diamanthelm
|
||||
item.helmetGold.name=Goldhelm
|
||||
item.helmetIron.name=Eisenhelm
|
||||
item.hoeDiamond.name=Diamanthacke
|
||||
item.hoeGold.name=Goldhacke
|
||||
item.hoeIron.name=Eisenhacke
|
||||
item.hoeStone.name=Steinhacke
|
||||
item.hoeWood.name=Holzhacke
|
||||
item.horsearmordiamond.name=Diamantene Pferderüstung
|
||||
item.horsearmorgold.name=Goldene Pferderüstung
|
||||
item.horsearmormetal.name=Eiserne Pferderüstung
|
||||
item.ingotGold.name=Goldbarren
|
||||
item.ingotIron.name=Eisenbarren
|
||||
item.ironNugget.name=Eisenklumpen
|
||||
item.knowledgeBook.name=Buch des Wissens
|
||||
item.leash.name=Leine
|
||||
item.leather.name=Leder
|
||||
item.leggingsChain.name=Kettenhose
|
||||
item.leggingsCloth.name=Lederhose
|
||||
item.leggingsDiamond.name=Diamantbeinschutz
|
||||
item.leggingsGold.name=Goldbeinschutz
|
||||
item.leggingsIron.name=Eisenbeinschutz
|
||||
item.magmaCream.name=Magmacreme
|
||||
item.map.name=Karte
|
||||
item.melon.name=Melonenscheibe
|
||||
item.milk.name=Milch
|
||||
item.minecart.name=Lore
|
||||
item.minecartChest.name=Güterlore
|
||||
item.minecartCommandBlock.name=Befehlsblocklore
|
||||
item.minecartFurnace.name=Antriebslore
|
||||
item.minecartHopper.name=Trichterlore
|
||||
item.minecartTnt.name=TNT-Lore
|
||||
item.monsterPlacer.name=Erschaffe
|
||||
item.mushroomStew.name=Pilzsuppe
|
||||
item.muttonCooked.name=Gebratenes Hammelfleisch
|
||||
item.muttonRaw.name=Rohes Hammelfleisch
|
||||
item.nameTag.name=Namensschild
|
||||
item.netherStalkSeeds.name=Netherwarze
|
||||
item.netherStar.name=Netherstern
|
||||
item.netherbrick.name=Netherziegel
|
||||
item.netherquartz.name=Netherquarz
|
||||
item.painting.name=Gemälde
|
||||
item.paper.name=Papier
|
||||
item.pickaxeDiamond.name=Diamantspitzhacke
|
||||
item.pickaxeGold.name=Goldspitzhacke
|
||||
item.pickaxeIron.name=Eisenspitzhacke
|
||||
item.pickaxeStone.name=Steinspitzhacke
|
||||
item.pickaxeWood.name=Holzspitzhacke
|
||||
item.porkchopCooked.name=Gebratenes Schweinefleisch
|
||||
item.porkchopRaw.name=Rohes Schweinefleisch
|
||||
item.potato.name=Kartoffel
|
||||
item.potatoBaked.name=Ofenkartoffel
|
||||
item.potatoPoisonous.name=Giftige Kartoffel
|
||||
item.potion.name=Trank
|
||||
item.prismarineCrystals.name=Prismarinkristalle
|
||||
item.prismarineShard.name=Prismarinscherbe
|
||||
item.pumpkinPie.name=Kürbiskuchen
|
||||
item.rabbitCooked.name=Gebratenes Kaninchen
|
||||
item.rabbitFoot.name=Hasenpfote
|
||||
item.rabbitHide.name=Kaninchenfell
|
||||
item.rabbitRaw.name=Rohes Kaninchen
|
||||
item.rabbitStew.name=Kaninchenragout
|
||||
item.record.11.desc=C418 - 11
|
||||
item.record.13.desc=C418 - 13
|
||||
item.record.blocks.desc=C418 - Blocks
|
||||
item.record.cat.desc=C418 - Cat
|
||||
item.record.chirp.desc=C418 - Chirp
|
||||
item.record.far.desc=C418 - Far
|
||||
item.record.mall.desc=C418 - Mall
|
||||
item.record.mellohi.desc=C418 - Mellohi
|
||||
item.record.name=Schallplatte
|
||||
item.record.stal.desc=C418 - Stal
|
||||
item.record.strad.desc=C418 - Strad
|
||||
item.record.wait.desc=C418 - Wait
|
||||
item.record.ward.desc=C418 - Ward
|
||||
item.redstone.name=Redstone
|
||||
item.reeds.name=Zuckerrohr
|
||||
item.rottenFlesh.name=Verrottetes Fleisch
|
||||
item.saddle.name=Sattel
|
||||
item.seeds.name=Weizenkörner
|
||||
item.seeds_melon.name=Melonenkerne
|
||||
item.seeds_pumpkin.name=Kürbiskerne
|
||||
item.shears.name=Schere
|
||||
item.shield.name=Schild
|
||||
item.shovelDiamond.name=Diamantschaufel
|
||||
item.shovelGold.name=Goldschaufel
|
||||
item.shovelIron.name=Eisenschaufel
|
||||
item.shovelStone.name=Steinschaufel
|
||||
item.shovelWood.name=Holzschaufel
|
||||
item.shulkerShell.name=Shulkerschale
|
||||
item.sign.name=Schild
|
||||
item.skull.char.name=Kopf
|
||||
item.skull.creeper.name=Creeperkopf
|
||||
item.skull.dragon.name=Drachenkopf
|
||||
item.skull.skeleton.name=Skelettschädel
|
||||
item.skull.wither.name=Witherskelettschädel
|
||||
item.skull.zombie.name=Zombiekopf
|
||||
item.slimeball.name=Schleimball
|
||||
item.snowball.name=Schneeball
|
||||
item.speckledMelon.name=Glitzernde Melonenscheibe
|
||||
item.spectral_arrow.name=Spektralpfeil
|
||||
item.spiderEye.name=Spinnenauge
|
||||
item.stick.name=Stock
|
||||
item.string.name=Faden
|
||||
item.sugar.name=Zucker
|
||||
item.sulphur.name=Schwarzpulver
|
||||
item.swordDiamond.name=Diamantschwert
|
||||
item.swordGold.name=Goldschwert
|
||||
item.swordIron.name=Eisenschwert
|
||||
item.swordStone.name=Steinschwert
|
||||
item.swordWood.name=Holzschwert
|
||||
item.tipped_arrow.name=Getränkter Pfeil
|
||||
item.totem.name=Totem der Unsterblichkeit
|
||||
item.wheat.name=Weizen
|
||||
item.writingBook.name=Buch und Feder
|
||||
item.writtenBook.name=Beschriebenes Buch
|
||||
item.yellowDust.name=Glowstonestaub
|
||||
lingering_potion.effect.awkward=Seltsamer Verweiltrank
|
||||
lingering_potion.effect.empty=Nicht braubarer Verweiltrank
|
||||
lingering_potion.effect.fire_resistance=Verweiltrank der Feuerresistenz
|
||||
lingering_potion.effect.harming=Verweiltrank des Schadens
|
||||
lingering_potion.effect.healing=Verweiltrank der Heilung
|
||||
lingering_potion.effect.invisibility=Verweiltrank der Unsichtbarkeit
|
||||
lingering_potion.effect.leaping=Verweiltrank der Sprungkraft
|
||||
lingering_potion.effect.luck=Verweiltrank des Glücks
|
||||
lingering_potion.effect.mundane=Gewöhnlicher Verweiltrank
|
||||
lingering_potion.effect.night_vision=Verweiltrank der Nachtsicht
|
||||
lingering_potion.effect.poison=Verweiltrank der Vergiftung
|
||||
lingering_potion.effect.regeneration=Verweiltrank der Regeneration
|
||||
lingering_potion.effect.slowness=Verweiltrank der Langsamkeit
|
||||
lingering_potion.effect.strength=Verweiltrank der Stärke
|
||||
lingering_potion.effect.swiftness=Verweiltrank der Schnelligkeit
|
||||
lingering_potion.effect.thick=Dickflüssiger Verweiltrank
|
||||
lingering_potion.effect.water=Verweilende Wasserflasche
|
||||
lingering_potion.effect.water_breathing=Verweiltrank der Unterwasseratmung
|
||||
lingering_potion.effect.weakness=Verweiltrank der Schwäche
|
||||
potion.effect.awkward=Seltsamer Trank
|
||||
potion.effect.empty=Nicht braubarer Trank
|
||||
potion.effect.fire_resistance=Trank der Feuerresistenz
|
||||
potion.effect.harming=Trank des Schadens
|
||||
potion.effect.healing=Trank der Heilung
|
||||
potion.effect.invisibility=Trank der Unsichtbarkeit
|
||||
potion.effect.leaping=Trank der Sprungkraft
|
||||
potion.effect.luck=Trank des Glücks
|
||||
potion.effect.mundane=Gewöhnlicher Trank
|
||||
potion.effect.night_vision=Trank der Nachtsicht
|
||||
potion.effect.poison=Trank der Vergiftung
|
||||
potion.effect.regeneration=Trank der Regeneration
|
||||
potion.effect.slowness=Trank der Langsamkeit
|
||||
potion.effect.strength=Trank der Stärke
|
||||
potion.effect.swiftness=Trank der Schnelligkeit
|
||||
potion.effect.thick=Dickflüssiger Trank
|
||||
potion.effect.water=Wasserflasche
|
||||
potion.effect.water_breathing=Trank der Unterwasseratmung
|
||||
potion.effect.weakness=Trank der Schwäche
|
||||
splash_potion.effect.awkward=Seltsamer Wurftrank
|
||||
splash_potion.effect.empty=Nicht braubarer Wurftrank
|
||||
splash_potion.effect.fire_resistance=Wurftrank der Feuerresistenz
|
||||
splash_potion.effect.harming=Wurftrank des Schadens
|
||||
splash_potion.effect.healing=Wurftrank der Heilung
|
||||
splash_potion.effect.invisibility=Wurftrank der Unsichtbarkeit
|
||||
splash_potion.effect.leaping=Wurftrank der Sprungkraft
|
||||
splash_potion.effect.luck=Wurftrank des Glücks
|
||||
splash_potion.effect.mundane=Gewöhnlicher Wurftrank
|
||||
splash_potion.effect.night_vision=Wurftrank der Nachtsicht
|
||||
splash_potion.effect.poison=Wurftrank der Vergiftung
|
||||
splash_potion.effect.regeneration=Wurftrank der Regeneration
|
||||
splash_potion.effect.slowness=Wurftrank der Langsamkeit
|
||||
splash_potion.effect.strength=Wurftrank der Stärke
|
||||
splash_potion.effect.swiftness=Wurftrank der Schnelligkeit
|
||||
splash_potion.effect.thick=Dickflüssiger Wurftrank
|
||||
splash_potion.effect.water=Werfbare Wasserflasche
|
||||
splash_potion.effect.water_breathing=Wurftrank der Unterwasseratmung
|
||||
splash_potion.effect.weakness=Wurftrank der Schwäche
|
||||
tile.acaciaFence.name=Akazienholzzaun
|
||||
tile.acaciaFenceGate.name=Akazienholzzauntor
|
||||
tile.activatorRail.name=Aktivierungsschiene
|
||||
tile.anvil.intact.name=Amboss
|
||||
tile.anvil.slightlyDamaged.name=Leicht beschädigter Amboss
|
||||
tile.anvil.veryDamaged.name=Stark beschädigter Amboss
|
||||
tile.barrier.name=Barriere
|
||||
tile.beacon.name=Leuchtfeuer
|
||||
tile.bedrock.name=Grundgestein
|
||||
tile.birchFence.name=Birkenholzzaun
|
||||
tile.birchFenceGate.name=Birkenholzzauntor
|
||||
tile.blockCoal.name=Kohleblock
|
||||
tile.blockDiamond.name=Diamantblock
|
||||
tile.blockEmerald.name=Smaragdblock
|
||||
tile.blockGold.name=Goldblock
|
||||
tile.blockIron.name=Eisenblock
|
||||
tile.blockLapis.name=Lapislazuliblock
|
||||
tile.blockRedstone.name=Redstone-Block
|
||||
tile.boneBlock.name=Knochenblock
|
||||
tile.bookshelf.name=Bücherregal
|
||||
tile.brick.name=Ziegelsteine
|
||||
tile.button.name=Knopf
|
||||
tile.cactus.name=Kaktus
|
||||
tile.chainCommandBlock.name=Ketten-Befehlsblock
|
||||
tile.chest.name=Truhe
|
||||
tile.chestTrap.name=Redstone-Truhe
|
||||
tile.chorusFlower.name=Chorusblüte
|
||||
tile.chorusPlant.name=Choruspflanze
|
||||
tile.clay.name=Ton
|
||||
tile.clayHardened.name=Keramik
|
||||
tile.clayHardenedStained.black.name=Schwarze Keramik
|
||||
tile.clayHardenedStained.blue.name=Blaue Keramik
|
||||
tile.clayHardenedStained.brown.name=Braune Keramik
|
||||
tile.clayHardenedStained.cyan.name=Türkise Keramik
|
||||
tile.clayHardenedStained.gray.name=Graue Keramik
|
||||
tile.clayHardenedStained.green.name=Grüne Keramik
|
||||
tile.clayHardenedStained.lightBlue.name=Hellblaue Keramik
|
||||
tile.clayHardenedStained.lime.name=Hellgrüne Keramik
|
||||
tile.clayHardenedStained.magenta.name=Magenta Keramik
|
||||
tile.clayHardenedStained.orange.name=Orange Keramik
|
||||
tile.clayHardenedStained.pink.name=Rosa Keramik
|
||||
tile.clayHardenedStained.purple.name=Violette Keramik
|
||||
tile.clayHardenedStained.red.name=Rote Keramik
|
||||
tile.clayHardenedStained.silver.name=Hellgraue Keramik
|
||||
tile.clayHardenedStained.white.name=Weiße Keramik
|
||||
tile.clayHardenedStained.yellow.name=Gelbe Keramik
|
||||
tile.cloth.black.name=Schwarze Wolle
|
||||
tile.cloth.blue.name=Blaue Wolle
|
||||
tile.cloth.brown.name=Braune Wolle
|
||||
tile.cloth.cyan.name=Türkise Wolle
|
||||
tile.cloth.gray.name=Graue Wolle
|
||||
tile.cloth.green.name=Grüne Wolle
|
||||
tile.cloth.lightBlue.name=Hellblaue Wolle
|
||||
tile.cloth.lime.name=Hellgrüne Wolle
|
||||
tile.cloth.magenta.name=Magenta Wolle
|
||||
tile.cloth.orange.name=Orange Wolle
|
||||
tile.cloth.pink.name=Rosa Wolle
|
||||
tile.cloth.purple.name=Violette Wolle
|
||||
tile.cloth.red.name=Rote Wolle
|
||||
tile.cloth.silver.name=Hellgraue Wolle
|
||||
tile.cloth.white.name=Weiße Wolle
|
||||
tile.cloth.yellow.name=Gelbe Wolle
|
||||
tile.cobbleWall.mossy.name=Bemooste Bruchsteinmauer
|
||||
tile.cobbleWall.normal.name=Bruchsteinmauer
|
||||
tile.commandBlock.name=Befehlsblock
|
||||
tile.concrete.black.name=Schwarzer Beton
|
||||
tile.concrete.blue.name=Blauer Beton
|
||||
tile.concrete.brown.name=Brauner Beton
|
||||
tile.concrete.cyan.name=Türkiser Beton
|
||||
tile.concrete.gray.name=Grauer Beton
|
||||
tile.concrete.green.name=Grüner Beton
|
||||
tile.concrete.lightBlue.name=Hellblauer Beton
|
||||
tile.concrete.lime.name=Hellgrüner Beton
|
||||
tile.concrete.magenta.name=Magenta Beton
|
||||
tile.concrete.orange.name=Oranger Beton
|
||||
tile.concrete.pink.name=Rosa Beton
|
||||
tile.concrete.purple.name=Violetter Beton
|
||||
tile.concrete.red.name=Roter Beton
|
||||
tile.concrete.silver.name=Hellgrauer Beton
|
||||
tile.concrete.white.name=Weißer Beton
|
||||
tile.concrete.yellow.name=Gelber Beton
|
||||
tile.concretePowder.black.name=Schwarzer Trockenbeton
|
||||
tile.concretePowder.blue.name=Blauer Trockenbeton
|
||||
tile.concretePowder.brown.name=Brauner Trockenbeton
|
||||
tile.concretePowder.cyan.name=Türkiser Trockenbeton
|
||||
tile.concretePowder.gray.name=Grauer Trockenbeton
|
||||
tile.concretePowder.green.name=Grüner Trockenbeton
|
||||
tile.concretePowder.lightBlue.name=Hellblauer Trockenbeton
|
||||
tile.concretePowder.lime.name=Hellgrüner Trockenbeton
|
||||
tile.concretePowder.magenta.name=Magenta Trockenbeton
|
||||
tile.concretePowder.orange.name=Oranger Trockenbeton
|
||||
tile.concretePowder.pink.name=Rosa Trockenbeton
|
||||
tile.concretePowder.purple.name=Violetter Trockenbeton
|
||||
tile.concretePowder.red.name=Roter Trockenbeton
|
||||
tile.concretePowder.silver.name=Hellgrauer Trockenbeton
|
||||
tile.concretePowder.white.name=Weißer Trockenbeton
|
||||
tile.concretePowder.yellow.name=Gelber Trockenbeton
|
||||
tile.darkOakFence.name=Schwarzeichenholzzaun
|
||||
tile.darkOakFenceGate.name=Schwarzeichenholzzauntor
|
||||
tile.daylightDetector.name=Tageslichtsensor
|
||||
tile.deadbush.name=Toter Busch
|
||||
tile.detectorRail.name=Sensorschiene
|
||||
tile.dirt.coarse.name=Grobe Erde
|
||||
tile.dirt.default.name=Erde
|
||||
tile.dirt.podzol.name=Podsol
|
||||
tile.dispenser.name=Werfer
|
||||
tile.doublePlant.fern.name=Großer Farn
|
||||
tile.doublePlant.grass.name=Hohes Gras
|
||||
tile.doublePlant.paeonia.name=Pfingstrose
|
||||
tile.doublePlant.rose.name=Rosenstrauch
|
||||
tile.doublePlant.sunflower.name=Sonnenblume
|
||||
tile.doublePlant.syringa.name=Flieder
|
||||
tile.dragonEgg.name=Drachenei
|
||||
tile.dropper.name=Spender
|
||||
tile.enchantmentTable.name=Zaubertisch
|
||||
tile.endBricks.name=Endsteinziegel
|
||||
tile.endPortalFrame.name=Endportalrahmen
|
||||
tile.endRod.name=Endstab
|
||||
tile.enderChest.name=Endertruhe
|
||||
tile.farmland.name=Ackerboden
|
||||
tile.fence.name=Eichenholzzaun
|
||||
tile.fenceGate.name=Eichenholzzauntor
|
||||
tile.fenceIron.name=Eisengitter
|
||||
tile.fire.name=Feuer
|
||||
tile.flower1.dandelion.name=Löwenzahn
|
||||
tile.flower2.allium.name=Sternlauch
|
||||
tile.flower2.blueOrchid.name=Blaue Orchidee
|
||||
tile.flower2.houstonia.name=Porzellansternchen
|
||||
tile.flower2.oxeyeDaisy.name=Margerite
|
||||
tile.flower2.poppy.name=Mohn
|
||||
tile.flower2.tulipOrange.name=Orange Tulpe
|
||||
tile.flower2.tulipPink.name=Rosa Tulpe
|
||||
tile.flower2.tulipRed.name=Rote Tulpe
|
||||
tile.flower2.tulipWhite.name=Weiße Tulpe
|
||||
tile.furnace.name=Ofen
|
||||
tile.glass.name=Glas
|
||||
tile.glazedTerracottaBlack.name=Schwarze glasierte Keramik
|
||||
tile.glazedTerracottaBlue.name=Blaue glasierte Keramik
|
||||
tile.glazedTerracottaBrown.name=Braune glasierte Keramik
|
||||
tile.glazedTerracottaCyan.name=Türkise glasierte Keramik
|
||||
tile.glazedTerracottaGray.name=Graue glasierte Keramik
|
||||
tile.glazedTerracottaGreen.name=Grüne glasierte Keramik
|
||||
tile.glazedTerracottaLightBlue.name=Hellblaue glasierte Keramik
|
||||
tile.glazedTerracottaLime.name=Hellgrüne glasierte Keramik
|
||||
tile.glazedTerracottaMagenta.name=Magenta glasierte Keramik
|
||||
tile.glazedTerracottaOrange.name=Orange glasierte Keramik
|
||||
tile.glazedTerracottaPink.name=Rosa glasierte Keramik
|
||||
tile.glazedTerracottaPurple.name=Violette glasierte Keramik
|
||||
tile.glazedTerracottaRed.name=Rote glasierte Keramik
|
||||
tile.glazedTerracottaSilver.name=Hellgraue glasierte Keramik
|
||||
tile.glazedTerracottaWhite.name=Weiße glasierte Keramik
|
||||
tile.glazedTerracottaYellow.name=Gelbe glasierte Keramik
|
||||
tile.goldenRail.name=Antriebsschiene
|
||||
tile.grass.name=Grasblock
|
||||
tile.grassPath.name=Trampelpfad
|
||||
tile.gravel.name=Kies
|
||||
tile.hayBlock.name=Strohballen
|
||||
tile.hellrock.name=Netherrack
|
||||
tile.hellsand.name=Seelensand
|
||||
tile.hopper.name=Trichter
|
||||
tile.ice.name=Eis
|
||||
tile.icePacked.name=Packeis
|
||||
tile.ironTrapdoor.name=Eisenfalltür
|
||||
tile.jukebox.name=Plattenspieler
|
||||
tile.jungleFence.name=Tropenholzzaun
|
||||
tile.jungleFenceGate.name=Tropenholzzauntor
|
||||
tile.ladder.name=Leiter
|
||||
tile.lava.name=Lava
|
||||
tile.leaves.acacia.name=Akazienlaub
|
||||
tile.leaves.big_oak.name=Schwarzeichenlaub
|
||||
tile.leaves.birch.name=Birkenlaub
|
||||
tile.leaves.jungle.name=Tropenbaumlaub
|
||||
tile.leaves.oak.name=Eichenlaub
|
||||
tile.leaves.spruce.name=Fichtennadeln
|
||||
tile.lever.name=Hebel
|
||||
tile.lightgem.name=Glowstone
|
||||
tile.litpumpkin.name=Kürbislaterne
|
||||
tile.log.acacia.name=Akazienholz
|
||||
tile.log.big_oak.name=Schwarzeichenholz
|
||||
tile.log.birch.name=Birkenholz
|
||||
tile.log.jungle.name=Tropenholz
|
||||
tile.log.oak.name=Eichenholz
|
||||
tile.log.spruce.name=Fichtenholz
|
||||
tile.magma.name=Magmablock
|
||||
tile.melon.name=Melone
|
||||
tile.mobSpawner.name=Monsterspawner
|
||||
tile.monsterStoneEgg.brick.name=Steinziegel (Silberfischchen)
|
||||
tile.monsterStoneEgg.chiseledbrick.name=Gemeißelte Steinziegel (Silberfischchen)
|
||||
tile.monsterStoneEgg.cobble.name=Bruchstein (Silberfischchen)
|
||||
tile.monsterStoneEgg.crackedbrick.name=Rissige Steinziegel (Silberfischchen)
|
||||
tile.monsterStoneEgg.mossybrick.name=Bemooste Steinziegel (Silberfischchen)
|
||||
tile.monsterStoneEgg.stone.name=Stein (Silberfischchen)
|
||||
tile.mushroom.name=Pilz
|
||||
tile.musicBlock.name=Notenblock
|
||||
tile.mycel.name=Myzel
|
||||
tile.netherBrick.name=Netherziegel
|
||||
tile.netherFence.name=Netherziegelzaun
|
||||
tile.netherStalk.name=Netherwarze
|
||||
tile.netherWartBlock.name=Netherwarzenblock
|
||||
tile.netherquartz.name=Netherquarzerz
|
||||
tile.notGate.name=Redstone-Fackel
|
||||
tile.observer.name=Beobachter
|
||||
tile.obsidian.name=Obsidian
|
||||
tile.oreCoal.name=Steinkohle
|
||||
tile.oreDiamond.name=Diamanterz
|
||||
tile.oreEmerald.name=Smaragderz
|
||||
tile.oreGold.name=Golderz
|
||||
tile.oreIron.name=Eisenerz
|
||||
tile.oreLapis.name=Lapislazulierz
|
||||
tile.oreRedstone.name=Redstone-Erz
|
||||
tile.pistonBase.name=Kolben
|
||||
tile.pistonStickyBase.name=Klebriger Kolben
|
||||
tile.portal.name=Portal
|
||||
tile.pressurePlateStone.name=Steindruckplatte
|
||||
tile.pressurePlateWood.name=Holzdruckplatte
|
||||
tile.prismarine.bricks.name=Prismarinziegel
|
||||
tile.prismarine.dark.name=Dunkler Prismarin
|
||||
tile.prismarine.rough.name=Prismarin
|
||||
tile.pumpkin.name=Kürbis
|
||||
tile.purpurBlock.name=Purpurblock
|
||||
tile.purpurPillar.name=Purpursäule
|
||||
tile.purpurSlab.name=Purpurstufe
|
||||
tile.quartzBlock.chiseled.name=Gemeißelter Quarzblock
|
||||
tile.quartzBlock.default.name=Quarzblock
|
||||
tile.quartzBlock.lines.name=Quarzsäule
|
||||
tile.rail.name=Schiene
|
||||
tile.redNetherBrick.name=Rote Netherziegel
|
||||
tile.redSandStone.chiseled.name=Gemeißelter roter Sandstein
|
||||
tile.redSandStone.default.name=Roter Sandstein
|
||||
tile.redSandStone.smooth.name=Glatter roter Sandstein
|
||||
tile.redstoneLight.name=Redstone-Lampe
|
||||
tile.repeatingCommandBlock.name=Wiederhol-Befehlsblock
|
||||
tile.sand.default.name=Sand
|
||||
tile.sand.red.name=Roter Sand
|
||||
tile.sandStone.chiseled.name=Gemeißelter Sandstein
|
||||
tile.sandStone.default.name=Sandstein
|
||||
tile.sandStone.smooth.name=Glatter Sandstein
|
||||
tile.sapling.acacia.name=Akaziensetzling
|
||||
tile.sapling.big_oak.name=Schwarzeichensetzling
|
||||
tile.sapling.birch.name=Birkensetzling
|
||||
tile.sapling.jungle.name=Tropenbaumsetzling
|
||||
tile.sapling.oak.name=Eichensetzling
|
||||
tile.sapling.spruce.name=Fichtensetzling
|
||||
tile.seaLantern.name=Seelaterne
|
||||
tile.shulkerBoxBlack.name=Schwarze Shulkerkiste
|
||||
tile.shulkerBoxBlue.name=Blaue Shulkerkiste
|
||||
tile.shulkerBoxBrown.name=Braune Shulkerkiste
|
||||
tile.shulkerBoxCyan.name=Türkise Shulkerkiste
|
||||
tile.shulkerBoxGray.name=Graue Shulkerkiste
|
||||
tile.shulkerBoxGreen.name=Grüne Shulkerkiste
|
||||
tile.shulkerBoxLightBlue.name=Hellblaue Shulkerkiste
|
||||
tile.shulkerBoxLime.name=Hellgrüne Shulkerkiste
|
||||
tile.shulkerBoxMagenta.name=Magenta Shulkerkiste
|
||||
tile.shulkerBoxOrange.name=Orange Shulkerkiste
|
||||
tile.shulkerBoxPink.name=Rosa Shulkerkiste
|
||||
tile.shulkerBoxPurple.name=Violette Shulkerkiste
|
||||
tile.shulkerBoxRed.name=Rote Shulkerkiste
|
||||
tile.shulkerBoxSilver.name=Hellgraue Shulkerkiste
|
||||
tile.shulkerBoxWhite.name=Weiße Shulkerkiste
|
||||
tile.shulkerBoxYellow.name=Gelbe Shulkerkiste
|
||||
tile.slime.name=Schleimblock
|
||||
tile.snow.name=Schnee
|
||||
tile.sponge.dry.name=Schwamm
|
||||
tile.sponge.wet.name=Nasser Schwamm
|
||||
tile.spruceFence.name=Fichtenholzzaun
|
||||
tile.spruceFenceGate.name=Fichtenholzzauntor
|
||||
tile.stainedGlass.black.name=Schwarzes Glas
|
||||
tile.stainedGlass.blue.name=Blaues Glas
|
||||
tile.stainedGlass.brown.name=Braunes Glas
|
||||
tile.stainedGlass.cyan.name=Türkises Glas
|
||||
tile.stainedGlass.gray.name=Graues Glas
|
||||
tile.stainedGlass.green.name=Grünes Glas
|
||||
tile.stainedGlass.lightBlue.name=Hellblaues Glas
|
||||
tile.stainedGlass.lime.name=Hellgrünes Glas
|
||||
tile.stainedGlass.magenta.name=Magenta Glas
|
||||
tile.stainedGlass.orange.name=Oranges Glas
|
||||
tile.stainedGlass.pink.name=Rosa Glas
|
||||
tile.stainedGlass.purple.name=Violettes Glas
|
||||
tile.stainedGlass.red.name=Rotes Glas
|
||||
tile.stainedGlass.silver.name=Hellgraues Glas
|
||||
tile.stainedGlass.white.name=Weißes Glas
|
||||
tile.stainedGlass.yellow.name=Gelbes Glas
|
||||
tile.stairsBrick.name=Ziegeltreppe
|
||||
tile.stairsNetherBrick.name=Netherziegeltreppe
|
||||
tile.stairsPurpur.name=Purpurtreppe
|
||||
tile.stairsQuartz.name=Quarztreppe
|
||||
tile.stairsRedSandStone.name=Rote Sandsteintreppe
|
||||
tile.stairsSandStone.name=Sandsteintreppe
|
||||
tile.stairsStone.name=Bruchsteintreppe
|
||||
tile.stairsStoneBrickSmooth.name=Steinziegeltreppe
|
||||
tile.stairsWood.name=Eichenholztreppe
|
||||
tile.stairsWoodAcacia.name=Akazienholztreppe
|
||||
tile.stairsWoodBirch.name=Birkenholztreppe
|
||||
tile.stairsWoodDarkOak.name=Schwarzeichenholztreppe
|
||||
tile.stairsWoodJungle.name=Tropenholztreppe
|
||||
tile.stairsWoodSpruce.name=Fichtenholztreppe
|
||||
tile.stone.andesite.name=Andesit
|
||||
tile.stone.andesiteSmooth.name=Polierter Andesit
|
||||
tile.stone.diorite.name=Diorit
|
||||
tile.stone.dioriteSmooth.name=Polierter Diorit
|
||||
tile.stone.granite.name=Granit
|
||||
tile.stone.graniteSmooth.name=Polierter Granit
|
||||
tile.stone.stone.name=Stein
|
||||
tile.stoneMoss.name=Bemooster Bruchstein
|
||||
tile.stoneSlab.brick.name=Ziegelstufe
|
||||
tile.stoneSlab.cobble.name=Bruchsteinstufe
|
||||
tile.stoneSlab.netherBrick.name=Netherziegelstufe
|
||||
tile.stoneSlab.quartz.name=Quarzstufe
|
||||
tile.stoneSlab.sand.name=Sandsteinstufe
|
||||
tile.stoneSlab.smoothStoneBrick.name=Steinziegelstufe
|
||||
tile.stoneSlab.stone.name=Steinstufe
|
||||
tile.stoneSlab.wood.name=Holzstufe
|
||||
tile.stoneSlab2.red_sandstone.name=Rote Sandsteinstufe
|
||||
tile.stonebrick.name=Bruchstein
|
||||
tile.stonebricksmooth.chiseled.name=Gemeißelte Steinziegel
|
||||
tile.stonebricksmooth.cracked.name=Rissige Steinziegel
|
||||
tile.stonebricksmooth.default.name=Steinziegel
|
||||
tile.stonebricksmooth.mossy.name=Bemooste Steinziegel
|
||||
tile.structureBlock.name=Konstruktionsblock
|
||||
tile.structureVoid.name=Konstruktionsleere
|
||||
tile.tallgrass.fern.name=Farn
|
||||
tile.tallgrass.grass.name=Gras
|
||||
tile.tallgrass.shrub.name=Busch
|
||||
tile.thinGlass.name=Glasscheibe
|
||||
tile.thinStainedGlass.black.name=Schwarze Glasscheibe
|
||||
tile.thinStainedGlass.blue.name=Blaue Glasscheibe
|
||||
tile.thinStainedGlass.brown.name=Braune Glasscheibe
|
||||
tile.thinStainedGlass.cyan.name=Türkise Glasscheibe
|
||||
tile.thinStainedGlass.gray.name=Graue Glasscheibe
|
||||
tile.thinStainedGlass.green.name=Grüne Glasscheibe
|
||||
tile.thinStainedGlass.lightBlue.name=Hellblaue Glasscheibe
|
||||
tile.thinStainedGlass.lime.name=Hellgrüne Glasscheibe
|
||||
tile.thinStainedGlass.magenta.name=Magenta Glasscheibe
|
||||
tile.thinStainedGlass.orange.name=Orange Glasscheibe
|
||||
tile.thinStainedGlass.pink.name=Rosa Glasscheibe
|
||||
tile.thinStainedGlass.purple.name=Violette Glasscheibe
|
||||
tile.thinStainedGlass.red.name=Rote Glasscheibe
|
||||
tile.thinStainedGlass.silver.name=Hellgraue Glasscheibe
|
||||
tile.thinStainedGlass.white.name=Weiße Glasscheibe
|
||||
tile.thinStainedGlass.yellow.name=Gelbe Glasscheibe
|
||||
tile.tnt.name=TNT
|
||||
tile.torch.name=Fackel
|
||||
tile.trapdoor.name=Holzfalltür
|
||||
tile.tripWireSource.name=Haken
|
||||
tile.vine.name=Ranken
|
||||
tile.water.name=Wasser
|
||||
tile.waterlily.name=Seerosenblatt
|
||||
tile.web.name=Spinnennetz
|
||||
tile.weightedPlate_heavy.name=Wägeplatte (hohe Gewichte)
|
||||
tile.weightedPlate_light.name=Wägeplatte (niedrige Gewichte)
|
||||
tile.whiteStone.name=Endstein
|
||||
tile.wood.acacia.name=Akazienholzbretter
|
||||
tile.wood.big_oak.name=Schwarzeichenholzbretter
|
||||
tile.wood.birch.name=Birkenholzbretter
|
||||
tile.wood.jungle.name=Tropenholzbretter
|
||||
tile.wood.oak.name=Eichenholzbretter
|
||||
tile.wood.spruce.name=Fichtenholzbretter
|
||||
tile.woodSlab.acacia.name=Akazienholzstufe
|
||||
tile.woodSlab.big_oak.name=Schwarzeichenholzstufe
|
||||
tile.woodSlab.birch.name=Birkenholzstufe
|
||||
tile.woodSlab.jungle.name=Tropenholzstufe
|
||||
tile.woodSlab.oak.name=Eichenholzstufe
|
||||
tile.woodSlab.spruce.name=Fichtenholzstufe
|
||||
tile.woolCarpet.black.name=Schwarzer Teppich
|
||||
tile.woolCarpet.blue.name=Blauer Teppich
|
||||
tile.woolCarpet.brown.name=Brauner Teppich
|
||||
tile.woolCarpet.cyan.name=Türkiser Teppich
|
||||
tile.woolCarpet.gray.name=Grauer Teppich
|
||||
tile.woolCarpet.green.name=Grüner Teppich
|
||||
tile.woolCarpet.lightBlue.name=Hellblauer Teppich
|
||||
tile.woolCarpet.lime.name=Hellgrüner Teppich
|
||||
tile.woolCarpet.magenta.name=Magenta Teppich
|
||||
tile.woolCarpet.orange.name=Oranger Teppich
|
||||
tile.woolCarpet.pink.name=Rosa Teppich
|
||||
tile.woolCarpet.purple.name=Violetter Teppich
|
||||
tile.woolCarpet.red.name=Roter Teppich
|
||||
tile.woolCarpet.silver.name=Hellgrauer Teppich
|
||||
tile.woolCarpet.white.name=Weißer Teppich
|
||||
tile.woolCarpet.yellow.name=Gelber Teppich
|
||||
tile.workbench.name=Werkbank
|
||||
tipped_arrow.effect.awkward=Getränkter Pfeil
|
||||
tipped_arrow.effect.empty=Nicht herstellbarer getränkter Pfeil
|
||||
tipped_arrow.effect.fire_resistance=Pfeil der Feuerresistenz
|
||||
tipped_arrow.effect.harming=Pfeil des Schadens
|
||||
tipped_arrow.effect.healing=Pfeil der Heilung
|
||||
tipped_arrow.effect.invisibility=Pfeil der Unsichtbarkeit
|
||||
tipped_arrow.effect.leaping=Pfeil der Sprungkraft
|
||||
tipped_arrow.effect.luck=Pfeil des Glücks
|
||||
tipped_arrow.effect.mundane=Getränkter Pfeil
|
||||
tipped_arrow.effect.night_vision=Pfeil der Nachtsicht
|
||||
tipped_arrow.effect.poison=Pfeil der Vergiftung
|
||||
tipped_arrow.effect.regeneration=Pfeil der Regeneration
|
||||
tipped_arrow.effect.slowness=Pfeil der Langsamkeit
|
||||
tipped_arrow.effect.strength=Pfeil der Stärke
|
||||
tipped_arrow.effect.swiftness=Pfeil der Schnelligkeit
|
||||
tipped_arrow.effect.thick=Getränkter Pfeil
|
||||
tipped_arrow.effect.water=Nasser Pfeil
|
||||
tipped_arrow.effect.water_breathing=Pfeil der Unterwasseratmung
|
||||
tipped_arrow.effect.weakness=Pfeil der Schwäche
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
95
plugin/src/main/resources/lang/messages-de_DE.lang
Normal file
95
plugin/src/main/resources/lang/messages-de_DE.lang
Normal file
@ -0,0 +1,95 @@
|
||||
message.shop-created=&6Dir wurden &c%CREATION-PRICE% &6abgenommen, um diesen Shop zu erstellen.
|
||||
message.admin-shop-created=&6Dir wurden &c%CREATION-PRICE% &6abgenommen, um diesen Admin Shop zu erstellen.
|
||||
message.chest-already-shop=&cTruhe ist bereits ein Shop.
|
||||
message.chest-blocked=&cÜber der Truhe ist kein Platz.
|
||||
message.double-chest-blocked=&cÜber der Truhe ist kein Platz.
|
||||
message.shop-removed=&6Shop entfernt.
|
||||
message.shop-removed-refund=&6Shop entfernt. Dir wurden &c%CREATION-PRICE%&6 erstattet.
|
||||
message.all-shops-removed=&6Alle (&c%AMOUNT%&6) Shops von &c%VENDOR%&6 wurden entfernt.
|
||||
message.chest-no-shop=&cTruhe ist kein Shop.
|
||||
message.shop-create-not-enough-money=&cNicht genug Geld. Du brauchst &6%CREATION-PRICE% &cum einen Shop zu erstellen.
|
||||
message.shopInfo.vendor=&6Verkäufer: &e%VENDOR%
|
||||
message.shopInfo.product=&6Produkt: &e%AMOUNT% x %ITEMNAME%
|
||||
message.shopInfo.stock=&6Auf Lager: &e%STOCK%
|
||||
message.shopInfo.chest-space=&6Platz in Truhe: &e%CHEST-SPACE%
|
||||
message.shopInfo.price=&6Preis: Kauf: &e%BUY-PRICE%&6 Verkauf: &e%SELL-PRICE%
|
||||
message.shopInfo.disabled=&7Deaktiviert
|
||||
message.shopInfo.is-normal=&6Typ: &eNormal
|
||||
message.shopInfo.is-admin=&6Typ: &eAdmin
|
||||
message.buy-and-sell-disabled=&cDu kannst keinen Shop ohne Kauf- und Verkaufspreis erstellen.
|
||||
message.buy-success=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%BUY-PRICE%&a von &6%VENDOR% &agekauft.
|
||||
message.buy-success-admin=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%BUY-PRICE% &agekauft.
|
||||
message.sell-success=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%SELL-PRICE%&a an &6%VENDOR% &averkauft.
|
||||
message.sell-success-admin=&aDu hast &6%AMOUNT% x %ITEMNAME%&a für &6%SELL-PRICE% &averkauft.
|
||||
message.someone-bought=&6%PLAYER% &ahat &6%AMOUNT% x %ITEMNAME%&a für &6%BUY-PRICE%&a von deinem Shop gekauft.
|
||||
message.someone-sold=&6%PLAYER% &ahat &6%AMOUNT% x %ITEMNAME%&a für &6%SELL-PRICE%&a an deinen Shop verkauft.
|
||||
message.revenue-while-offline=&6Während du offline warst, haben deine Shops einen Umsatz von &c%REVENUE%&6 gemacht.
|
||||
message.not-enough-inventory-space=&cNicht genug Platz im Inventar.
|
||||
message.chest-not-enough-inventory-space=&cShop ist voll.
|
||||
message.not-enough-money=&cNicht genug Geld.
|
||||
message.not-enough-items=&cNicht genug Items.
|
||||
message.vendor-not-enough-money=&cVerkäufer hat nicht genug Geld.
|
||||
message.out-of-stock=&cShop ausverkauft.
|
||||
message.vendor-out-of-stock=&cDein Shop, der &6%AMOUNT% x %ITEMNAME% &cverkauft, ist ausverkauft.
|
||||
message.error-occurred=&cEin Fehler ist aufgetreten: %ERROR%
|
||||
message.amount-and-price-not-number=&cAnzahl und Preise müssen Zahlen sein.
|
||||
message.amount-is-zero=&cAnzahl muss größer als 0 sein.
|
||||
message.prices-contain-decimals=&cPreise dürfen keine Dezimalen enthalten.
|
||||
message.no-item-in-hand=&cKein Item in der Hand.
|
||||
message.click-chest-to-create-shop=&aKlicke innerhalb von 15 Sekunden auf eine Truhe, um einen Shop zu erstellen.
|
||||
message.click-chest-to-remove-shop=&aKlicke innerhalb von 15 Sekunden auf einen Shop, um ihn zu entfernen.
|
||||
message.click-chest-for-info=&aKlicke innerhalb von 15 Sekunden auf einen Shop, um Informationen über ihn zu bekommen.
|
||||
message.click-chest-to-open-shop=&Klicke innerhalb von 15 Sekunden auf einen Shop, um ihn zu öffnen.
|
||||
message.click-to-confirm=&aKlicke noch einmal zum Bestätigen.
|
||||
message.opened-shop=&aDu hast &6%VENDOR%&as Shop geöffnet.
|
||||
message.cannot-break-shop=&cDu kannst einen Shop nicht zerstören.
|
||||
message.cannot-sell-broken-item=&cDu kannst kein kaputtes Artikel verkaufen.
|
||||
message.buy-price-too-low=&cDer Kaufpreis muss höher sein als %MIN-PRICE%.
|
||||
message.sell-price-too-low=&cDer Verkaufspreis muss höher sein als %MIN-PRICE%.
|
||||
message.buy-price-too-high=&cDer Kaufpreis muss geringer sein als %MAX-PRICE%.
|
||||
message.sell-price-too-high=&cDer Verkaufspreis muss geringer sein als %MAX-PRICE%.
|
||||
message.buying-disabled=&cKaufen ist an diesem Shop nicht möglich.
|
||||
message.selling-disabled=&cVerkaufen ist an diesem Shop nicht möglich.
|
||||
message.reloaded-shops=&a%AMOUNT% Shop/s wurden erfolgreich neu geladen.
|
||||
message.shop-limit-reached=&cDu hast dein Limit von &6%LIMIT% &cShop/s erreicht.
|
||||
message.occupied-shop-slots=&6Du hast &c%AMOUNT%/%LIMIT% &6Shop Slot/s benutzt.
|
||||
message.cannot-sell-item=&cDu kannst für diesen Artikel keinen Shop erstellen.
|
||||
message.use-in-creative=&cDu kannst im Kreativ-Modus keine Shops benutzen.
|
||||
message.select-item=&aÖffne dein Inventar und lass ein Item fallen, um es auszuwählen.
|
||||
message.item-selected=&aItem wurde ausgewählt: &6%ITEMNAME%
|
||||
message.creation-cancelled=&cShoperstellung wurde abgebrochen.
|
||||
message.update.update-available=&6&lVersion &c&l%VERSION% &6&lvon &c&lShopChest &6&list verfügbar.
|
||||
message.update.click-to-download=Klicke hier zum Herunterladen
|
||||
message.update.no-update=&6&lKeine neue Aktualisierung verfügbar.
|
||||
message.update.checking=&6&lSuche nach Aktualisierungen...
|
||||
message.update.error=&c&lFehler beim Suchen nach Aktualisierungen.
|
||||
message.noPermission.create=&cDu hast keine Berechtigung einen Shop zu erstellen.
|
||||
message.noPermission.create-admin=&cDu hast keine Berechtigung einen Admin-Shop zu erstellen.
|
||||
message.noPermission.create-protected=&cDu hast keine Berechtigung hier einen Shop zu erstellen.
|
||||
message.noPermission.open-others=&cDu hast keine Berechtigung diesen Shop zu öffnen.
|
||||
message.noPermission.buy=&cDu hast keine Berechtigung etwas zu kaufen.
|
||||
message.noPermission.sell=&cDu hast keine Berechtigung etwas zu verkaufen.
|
||||
message.noPermission.buy-here=&cDu hast keine Berechtigung hier etwas zu kaufen.
|
||||
message.noPermission.sell-here=&cDu hast keine Berechtigung hier etwas zu verkaufen.
|
||||
message.noPermission.remove-others=&cDu hast keine Berechtigung diesen Shop zu entfernen.
|
||||
message.noPermission.remove-admin=&cDu hast keine Berechtigung einen Admin Shop zu entfernen.
|
||||
message.noPermission.reload=&cDu hast keine Berechtigung die Shops neu zu laden.
|
||||
message.noPermission.update=&cDu hast keine Berechtigung nach Aktualisierungen zu suchen.
|
||||
message.noPermission.config=&cDu hast keine Berechtigung Konfigurationswerte zu verändern.
|
||||
message.noPermission.extend-others=&cDu hast keine Berechtigung diesen Shop zu erweitern.
|
||||
message.noPermission.extend-protected=&cDu hast keine Berechtigung diesen Shop nach hier zu erweitern.
|
||||
message.commandDescription.header=&6==== &c/%COMMAND% &6Hilfe
|
||||
message.commandDescription.footer=&6==== Ende
|
||||
message.commandDescription.create=&a/%COMMAND% create <amount> <buy-price> <sell-price> - Erstelle einen Shop.
|
||||
message.commandDescription.create-admin=&a/%COMMAND% create <amount> <buy-price> <sell-price> [admin] - Erstelle einen Shop.
|
||||
message.commandDescription.remove=&a/%COMMAND% remove - Entferne einen Shop.
|
||||
message.commandDescription.info=&a/%COMMAND% info - Rufe Informationen über den Shop ab.
|
||||
message.commandDescription.removeall=&a/%COMMAND% removeall - Entferne alle Shops eines Spielers.
|
||||
message.commandDescription.reload=&a/%COMMAND% reload - Lade die Shops neu.
|
||||
message.commandDescription.update=&a/%COMMAND% update - Suche nach Aktualisierungen.
|
||||
message.commandDescription.limits=&a/%COMMAND% limits - Betrachte die Shop Limits.
|
||||
message.commandDescription.open=&a/%COMMAND% open - Öffne einen Shop.
|
||||
message.commandDescription.config=&a/%COMMAND% config <set|add|remove> <property> <value> - Verändere Konfigurationswerte.
|
||||
message.config.set=&6Eigenschaft &a%PROPERTY% &6wurde auf &a%VALUE% &6gesetzt.
|
||||
message.config.added=&6Wert &a%VALUE% &6wurde zu &a%PROPERTY% &6hinzugefügt.
|
||||
message.config.removed=&6Wert &a%VALUE% &6wurde aus &a%PROPERTY% &6entfernt.
|
332
plugin/src/main/resources/lang/messages-en_US.lang
Normal file
332
plugin/src/main/resources/lang/messages-en_US.lang
Normal file
@ -0,0 +1,332 @@
|
||||
# Set the message when a shop is created at the clicked chest.
|
||||
# Usable Placeholders: %CREATION-PRICE%
|
||||
message.shop-created=&6You were withdrawn &c%CREATION-PRICE% &6to create this shop.
|
||||
|
||||
# Set the message when an admin shop is created at the clicked chest.
|
||||
# Usable Placeholders: %CREATION-PRICE%
|
||||
message.admin-shop-created=&6You were withdrawn &c%CREATION-PRICE% &6to create this admin shop.
|
||||
|
||||
# Set the message when the clicked chest already is a shop.
|
||||
message.chest-already-shop=&cChest already is shop.
|
||||
|
||||
# Set the message when there is a block above the clicked chest.
|
||||
message.chest-blocked=&cThere must not be a block above the chest.
|
||||
|
||||
# Set the message when a player tries to place a chest next to a shop's chest
|
||||
# to create a double chest shop, but there is a block above the placed chest.
|
||||
message.double-chest-blocked=&cThere must not be a block above the chest.
|
||||
|
||||
# Set the message when the clicked shop is removed but no refund was given.
|
||||
message.shop-removed=&6Shop removed.
|
||||
|
||||
# Set the message when the clicked shop is removed and the player is refunded
|
||||
# the creation price.
|
||||
# Usable Placeholders: %CREATION-PRICE%
|
||||
message.shop-removed-refund=&6Shop removed. You were refunded &c%CREATION-PRICE%&6.
|
||||
|
||||
# Set the message when all shops of a player were removed.
|
||||
# Usable Placeholders: %AMOUNT%, %VENDOR%
|
||||
message.all-shops-removed=&6Removed all (&c%AMOUNT%&6) shops of &c%VENDOR%&6.
|
||||
|
||||
# Set the message when the clicked chest is not a shop.
|
||||
message.chest-no-shop=&cChest is not a shop.
|
||||
|
||||
# Set the message when the player doesn't have enough money to create a shop
|
||||
# Usable Placeholders: %CREATION-PRICE%
|
||||
message.shop-create-not-enough-money=&cNot enough money. You need &6%CREATION-PRICE% &cto create a shop.
|
||||
|
||||
# Set the vendor message the player gets after entering '/shop info'.
|
||||
# Usable Placeholders: %VENDOR%
|
||||
message.shopInfo.vendor=&6Vendor: &e%VENDOR%
|
||||
|
||||
# Set the product message the player gets after entering '/shop info'.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%
|
||||
message.shopInfo.product=&6Product: &e%AMOUNT% x %ITEMNAME%
|
||||
|
||||
# Set the in-stock message the player after entering '/shop info'.
|
||||
# Usable Placeholders=%STOCK%
|
||||
message.shopInfo.stock=&6In Stock: &e%STOCK%
|
||||
|
||||
# Set the chest-space message the player after entering '/shop info'.
|
||||
# Usable Placeholders=%CHEST-SPACE%
|
||||
message.shopInfo.chest-space=&6Space in chest: &e%CHEST-SPACE%
|
||||
|
||||
# Set the price message the player gets after entering '/shop info'.
|
||||
# Usable Placeholders: %BUY-PRICE%, %SELL-PRICE%
|
||||
message.shopInfo.price=&6Price: Buy: &e%BUY-PRICE%&6 Sell: &e%SELL-PRICE%
|
||||
|
||||
# If the sell price or buy price is disabled, this message will be displayed instead of the price in the message above.
|
||||
message.shopInfo.disabled=&7Disabled
|
||||
|
||||
# Set the type message the player gets after entering '/shop info' ...
|
||||
# ... when the shop is normal.
|
||||
message.shopInfo.is-normal=&6Type: &eNormal
|
||||
|
||||
# ... when the shop is an admin shop.
|
||||
message.shopInfo.is-admin=&6Type: &eAdmin
|
||||
|
||||
# Set the message when the player tries to create a shop with sell price and buy price set to 0
|
||||
message.buy-and-sell-disabled=&cYou can't create a shop with buying and selling disabled.
|
||||
|
||||
# Set the message when the player successfully bought something.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%, %BUY-PRICE%, %VENDOR%
|
||||
message.buy-success=&aYou bought &6%AMOUNT% x %ITEMNAME%&a for &6%BUY-PRICE%&a from &6%VENDOR%&a.
|
||||
|
||||
# Set the message when the player successfully bought something from an admin shop.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%, %BUY-PRICE%
|
||||
message.buy-success-admin=&aYou bought &6%AMOUNT% x %ITEMNAME%&a for &6%BUY-PRICE%&a.
|
||||
|
||||
# Set the message when the player successfully sold something.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%, %SELL-PRICE%, %VENDOR%
|
||||
message.sell-success=&aYou sold &6%AMOUNT% x %ITEMNAME%&a for &6%SELL-PRICE%&a to &6%VENDOR%&a.
|
||||
|
||||
# Set the message when the player successfully sold something to an admin shop.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%, %SELL-PRICE%
|
||||
message.sell-success-admin=&aYou sold &6%AMOUNT% x %ITEMNAME%&a for &6%SELL-PRICE%&a.
|
||||
|
||||
# Set the message when a player bought something from the player's shop.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%, %BUY-PRICE%, %PLAYER%
|
||||
message.someone-bought=&6%PLAYER% &abought &6%AMOUNT% x %ITEMNAME%&a for &6%BUY-PRICE%&a from your shop.
|
||||
|
||||
# Set the message when a player sold something to the player's shop.
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%, %SELL-PRICE%, %PLAYER%
|
||||
message.someone-sold=&6%PLAYER% &asold &6%AMOUNT% x %ITEMNAME%&a for &6%SELL-PRICE%&a to your shop.
|
||||
|
||||
# Set the message when a player joins and made a revenue while he was offline.
|
||||
# Usable Placeholders: %REVENUE%
|
||||
message.revenue-while-offline=&6While you were offline, your shops have made a revenue of &c%REVENUE%&6.
|
||||
|
||||
# Set the message when the inventory is full when the player is buying something.
|
||||
message.not-enough-inventory-space=&cNot enough space in inventory.
|
||||
|
||||
# Set the message when the shop's inventory is full when the player is selling something.
|
||||
message.chest-not-enough-inventory-space=&cShop is full.
|
||||
|
||||
# Set the message when the player doesn't have enough money to buy something.
|
||||
message.not-enough-money=&cNot enough money.
|
||||
|
||||
# Set the message when the player doesn't have enough items to sell.
|
||||
message.not-enough-items=&cNot enough items.
|
||||
|
||||
# Set the message when the vendor doesn't have enough money to buy something from the player
|
||||
message.vendor-not-enough-money=&cVendor has not enough money.
|
||||
|
||||
# Set the message when the shop is out of stock.
|
||||
message.out-of-stock=&cShop out of stock.
|
||||
|
||||
# Set the message the vendor gets when his shop is out of stock
|
||||
# Usable Placeholders: %AMOUNT%, %ITEMNAME%
|
||||
message.vendor-out-of-stock=&cYour shop that sells &6%AMOUNT% x %ITEMNAME% &cis out of stock.
|
||||
|
||||
# Set the message when an error occurred.
|
||||
# Usable Placeholders: %ERROR%
|
||||
message.error-occurred=&cAn error occurred: %ERROR%
|
||||
|
||||
# Set the message when the arguments <AMOUNT>, <BUY-PRICE> and/or <SELL-PRICE> of '/shop create' are not a number.
|
||||
message.amount-and-price-not-number=&cAmount and prices must be numbers.
|
||||
|
||||
# Set the message when the argument <AMOUNT> is zero
|
||||
message.amount-is-zero=&cAmount must be greater than 0.
|
||||
|
||||
# Set the message when the config value "allow-decimals-in-prices" is set to false
|
||||
# and a player enters a price with decimals
|
||||
message.prices-contain-decimals=&cPrices must not contain decimals.
|
||||
|
||||
# Set the message when the player doesn't hold an item in the hand.
|
||||
message.no-item-in-hand=&cNo item in hand
|
||||
|
||||
# Set the message when the player must click a chest to create a shop.
|
||||
message.click-chest-to-create-shop=&aClick a chest within 15 seconds to create a shop.
|
||||
|
||||
# Set the message when the player must click a shop to remove it.
|
||||
message.click-chest-to-remove-shop=&aClick a shop within 15 seconds to remove it.
|
||||
|
||||
# Set the message when the player must click a shop to retrieve information.
|
||||
message.click-chest-for-info=&aClick a shop within 15 seconds to retrieve information.
|
||||
|
||||
# Set the message when the player must click a shop to open it.
|
||||
message.click-chest-to-open-shop=&aClick a shop within 15 seconds to open it.
|
||||
|
||||
# Set the message when the player must click the shop again to confirm the buy/sell.
|
||||
message.click-to-confirm=&aClick again to confirm.
|
||||
|
||||
# Set the message when the player opened a shop.
|
||||
# Usable Placeholders: %VENDOR%
|
||||
message.opened-shop=&aYou opened %VENDOR%'s shop.
|
||||
|
||||
# Set the message when the player tries to break a shop.
|
||||
message.cannot-break-shop=&cYou can't break a shop.
|
||||
|
||||
# Set the message when the player tries to sell a broken item.
|
||||
message.cannot-sell-broken-item=&cYou can't sell a broken item.
|
||||
|
||||
# Set the message when the entered buy price is below the minimum price.
|
||||
# Usable Placeholders: %MIN-PRICE%
|
||||
message.buy-price-too-low=&cThe buy price must be higher than %MIN-PRICE%.
|
||||
|
||||
# Set the message when the entered sell price is below the minimum price.
|
||||
# Usable Placeholders: %MIN-PRICE%
|
||||
message.sell-price-too-low=&cThe sell price must be higher than %MIN-PRICE%.
|
||||
|
||||
# Set the message when the entered buy price is below the maximum price.
|
||||
# Usable Placeholders: %MAX-PRICE%
|
||||
message.buy-price-too-high=&cThe buy price must be lower than %MAX-PRICE%.
|
||||
|
||||
# Set the message when the entered sell price is below the maximum price.
|
||||
# Usable Placeholders: %MAX-PRICE%
|
||||
message.sell-price-too-high=&cThe sell price must be lower than %MAX-PRICE%.
|
||||
|
||||
# Set the message when buying is disabled at the shop.
|
||||
message.buying-disabled=&cBuying is disabled at this shop.
|
||||
|
||||
# Set the message when selling is disabled at the shop.
|
||||
message.selling-disabled=&cSelling is disabled at this shop.
|
||||
|
||||
# Set the message when reloading is done.
|
||||
# Usable Placeholders: %AMOUNT% (Amount of shops)
|
||||
message.reloaded-shops=&aSuccessfully reloaded %AMOUNT% shop/s.
|
||||
|
||||
# Set the message when the player's shop limit is reached.
|
||||
# Usable Placeholders: %LIMIT%
|
||||
message.shop-limit-reached=&cYou reached your limit of &6%LIMIT% &cshop/s.
|
||||
|
||||
# Set the message that shows the player how many shop slots of his shop limit he has occupied.
|
||||
# Usable Placeholders: %LIMIT%, %AMOUNT% (Amount of shops)
|
||||
message.occupied-shop-slots=&6You have &c%AMOUNT%/%LIMIT% &6shop slot/s occupied.
|
||||
|
||||
# Set the message when the player tries to create a shop with an item which is listed in the blacklist.
|
||||
message.cannot-sell-item=&cYou cannot create a shop with this item.
|
||||
|
||||
# Set the message when the player tries to use a shop in creative mode.
|
||||
message.use-in-creative=&cYou cannot use a shop in creative mode.
|
||||
|
||||
# Set the message when the player has to select an item from the creative menu.
|
||||
message.select-item=&aOpen your inventory, and drop an item to select it.
|
||||
|
||||
# Set the message when the player has selected an item from the creative menu.
|
||||
# Usable Placeholders: %ITEMNAME%
|
||||
message.item-selected=&aItem has been selected: &6%ITEMNAME%
|
||||
|
||||
# Set the message when the player closes the creative menu to select an item.
|
||||
message.creation-cancelled=&cShop creation has been cancelled.
|
||||
|
||||
# Set the message when an update is available.
|
||||
# Usable Placeholders: %VERSION%
|
||||
message.update.update-available=&6&lVersion &c&l%VERSION% &6&lof &c&lShopChest &6&lis available &c&lhere.
|
||||
|
||||
# Set the message you get when hovering over the available message.
|
||||
message.update.click-to-download=Click to download
|
||||
|
||||
# Set the message when no update is available.
|
||||
message.update.no-update=&6&lNo new update available.
|
||||
|
||||
# Set the message when the update checker is started.
|
||||
message.update.checking=&6&lChecking for updates...
|
||||
|
||||
# Set the message when an error occurs while checking for updates.
|
||||
message.update.error=&c&lError while checking for updates.
|
||||
|
||||
# Set the message when a not permitted player tries to create a shop.
|
||||
message.noPermission.create=&cYou don't have permission to create a shop.
|
||||
|
||||
# Set the message when a not permitted player tries to create an admin shop.
|
||||
message.noPermission.create-admin=&cYou don't have permission to create an admin shop.
|
||||
|
||||
# Set the message when a not permitted player tries to create a shop on a protected chest.
|
||||
message.noPermission.create-protected=&cYou don't have permission to create a shop here.
|
||||
|
||||
# Set the message when a not permitted player tries to open another player's shop.
|
||||
message.noPermission.open-others=&cYou don't have permission to open this chest.
|
||||
|
||||
# Set the message when a not permitted player tries to buy something.
|
||||
message.noPermission.buy=&cYou don't have permission to buy something.
|
||||
|
||||
# Set the message when a not permitted player tries to sell something.
|
||||
message.noPermission.sell=&cYou don't have permission to sell something.
|
||||
|
||||
# Set the message when a player tries to buy something in a region/plot that denied shop use.
|
||||
message.noPermission.buy-here=&cYou don't have permission to buy something here.
|
||||
|
||||
# Set the message when a player tries to sell something in a region/plot region that denied shop use.
|
||||
message.noPermission.sell-here=&cYou don't have permission to sell something here.
|
||||
|
||||
# Set the message when a not permitted player tries to remove another player's shop.
|
||||
message.noPermission.remove-others=&cYou don't have permission to remove this shop.
|
||||
|
||||
# Set the message when a not permitted player tries to remove an admin shop.
|
||||
message.noPermission.remove-admin=&cYou don't have permission to remove an admin shop.
|
||||
|
||||
# Set the message when a not permitted player tries to reload the shops.
|
||||
message.noPermission.reload=&cYou don't have permission to reload the shops.
|
||||
|
||||
# Set the message when a not permitted player tries to check for updates.
|
||||
message.noPermission.update=&cYou don't have permission to check for updates.
|
||||
|
||||
# Set the message when a not permitted player tries to change configuration values.
|
||||
message.noPermission.config=&cYou don't have permission to change configuration values.
|
||||
|
||||
# Set the message when a not permitted player tries to extend another player's shop's chest.
|
||||
message.noPermission.extend-others=&cYou don't have permission to extend this chest.
|
||||
|
||||
# Set the message when a not permitted player tries to extend a chest into a protected region/plot (e.g. WorldGuard/Towny).
|
||||
message.noPermission.extend-protected=&cYou don't have permission to extend this chest to here.
|
||||
|
||||
# Set the header of the help message the player gets after entering '/shop' or an invalid command.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.header=&6==== &c/%COMMAND% &6Help
|
||||
|
||||
# Set the footer of the help message the player gets after entering '/shop' or an invalid command.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.footer=&6==== End
|
||||
|
||||
# Set the command description message for '/shop create' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.create=&a/%COMMAND% create <amount> <buy-price> <sell-price> - Create a shop.
|
||||
|
||||
# Set the command description message for '/shop create' when you type '/shop' and have permission "shopchest.create.admin"
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.create-admin=&a/%COMMAND% create <amount> <buy-price> <sell-price> [admin] - Create a shop.
|
||||
|
||||
# Set the command description message for '/shop remove' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.remove=&a/%COMMAND% remove - Remove a shop.
|
||||
|
||||
# Set the command description message for '/shop info' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.info=&a/%COMMAND% info - Retrieve shop information.
|
||||
|
||||
# Set the command description message for '/shop removeall' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.removeall=&a/%COMMAND% removeall - Remove all shops of a player.
|
||||
|
||||
# Set the command description message for '/shop reload' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.reload=&a/%COMMAND% reload - Reload shops.
|
||||
|
||||
# Set the command description message for '/shop update' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.update=&a/%COMMAND% update - Check for Updates.
|
||||
|
||||
# Set the command description message for '/shop limits' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.limits=&a/%COMMAND% limits - View shop limits.
|
||||
|
||||
# Set the command description message for '/shop open' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.open=&a/%COMMAND% open - Open a shop.
|
||||
|
||||
# Set the command description message for '/shop config' when you type '/shop'.
|
||||
# Usable Placeholders: %COMMAND%
|
||||
message.commandDescription.config=&a/%COMMAND% config <set|add|remove> <property> <value> - Change configuration values.
|
||||
|
||||
# Set the message a player gets after setting a configuration value per command
|
||||
# Usable Placeholders: %PROPERTY%, %VALUE%
|
||||
message.config.set=&6Changed &a%PROPERTY% &6to &a%VALUE%&6.
|
||||
|
||||
# Set the message a player gets after adding a value to a list in the configuration per command
|
||||
# Usable Placeholders: %PROPERTY%, %VALUE%
|
||||
message.config.added=&6Added &a%VALUE% &6to &a%PROPERTY%&6.
|
||||
|
||||
# Set the message a player gets after removing a value from a list in the configuration per command
|
||||
# Usable Placeholders: %PROPERTY%, %VALUE%
|
||||
message.config.removed=&6Removed &a%VALUE% &6from &a%PROPERTY%&6.
|
Loading…
Reference in New Issue
Block a user