mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-09-14 08:27:47 +02:00
commit
97515b92f6
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>de.jeffclan</groupId>
|
<groupId>de.jeffclan</groupId>
|
||||||
<artifactId>JeffChestSort</artifactId>
|
<artifactId>JeffChestSort</artifactId>
|
||||||
<version>6.4.5</version>
|
<version>7.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>JeffChestSort</name>
|
<name>JeffChestSort</name>
|
||||||
|
@ -29,6 +29,23 @@ public class JeffChestSortCommandExecutor implements CommandExecutor {
|
|||||||
// fix for Spigot's stupid /reload function
|
// fix for Spigot's stupid /reload function
|
||||||
plugin.listener.registerPlayerIfNeeded(p);
|
plugin.listener.registerPlayerIfNeeded(p);
|
||||||
|
|
||||||
|
// Settings GUI
|
||||||
|
if(args.length>0) {
|
||||||
|
if(args[0].equalsIgnoreCase("hotkey") || args[0].equalsIgnoreCase("hotkeys")) {
|
||||||
|
|
||||||
|
// if(plugin.hotkeyGUI==false) {
|
||||||
|
// p.sendMessage(plugin.messages.MSG_ERR_HOTKEYSDISABLED);
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
plugin.settingsGUI.openGUI(p);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// Settings GUI End
|
||||||
|
|
||||||
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(p.getUniqueId().toString());
|
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(p.getUniqueId().toString());
|
||||||
setting.sortingEnabled = !setting.sortingEnabled;
|
setting.sortingEnabled = !setting.sortingEnabled;
|
||||||
setting.hasSeenMessage=true;
|
setting.hasSeenMessage=true;
|
||||||
|
@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||||
import org.bukkit.event.inventory.InventoryEvent;
|
import org.bukkit.event.inventory.InventoryEvent;
|
||||||
@ -66,18 +67,32 @@ public class JeffChestSortListener implements Listener {
|
|||||||
p.getUniqueId().toString() + ".yml");
|
p.getUniqueId().toString() + ".yml");
|
||||||
YamlConfiguration playerConfig = YamlConfiguration.loadConfiguration(playerFile);
|
YamlConfiguration playerConfig = YamlConfiguration.loadConfiguration(playerFile);
|
||||||
|
|
||||||
|
playerConfig.addDefault("middleClick", plugin.getConfig().getBoolean("hotkeys.middle-click"));
|
||||||
|
playerConfig.addDefault("shiftClick", plugin.getConfig().getBoolean("hotkeys.shift-click"));
|
||||||
|
playerConfig.addDefault("doubleClick", plugin.getConfig().getBoolean("hotkeys.double-click"));
|
||||||
|
playerConfig.addDefault("shiftRightClick", plugin.getConfig().getBoolean("hotkeys.shift-right-click"));
|
||||||
|
|
||||||
boolean activeForThisPlayer = false;
|
boolean activeForThisPlayer = false;
|
||||||
|
boolean middleClick, shiftClick, doubleClick, shiftRightClick;
|
||||||
|
|
||||||
if (!playerFile.exists()) {
|
if (!playerFile.exists()) {
|
||||||
// If the player settings file does not exist for this player, set it to the
|
// If the player settings file does not exist for this player, set it to the
|
||||||
// default value
|
// default value
|
||||||
activeForThisPlayer = plugin.getConfig().getBoolean("sorting-enabled-by-default");
|
activeForThisPlayer = plugin.getConfig().getBoolean("sorting-enabled-by-default");
|
||||||
|
middleClick = plugin.getConfig().getBoolean("hotkeys.middle-click");
|
||||||
|
shiftClick = plugin.getConfig().getBoolean("hotkeys.shift-click");
|
||||||
|
doubleClick = plugin.getConfig().getBoolean("hotkeys.double-click");
|
||||||
|
shiftRightClick = plugin.getConfig().getBoolean("hotkeys.shift-right-click");
|
||||||
} else {
|
} else {
|
||||||
// If the file exists, check if the player has sorting enabled
|
// If the file exists, check if the player has sorting enabled
|
||||||
activeForThisPlayer = playerConfig.getBoolean("sortingEnabled");
|
activeForThisPlayer = playerConfig.getBoolean("sortingEnabled");
|
||||||
|
middleClick = playerConfig.getBoolean("middleClick");
|
||||||
|
shiftClick = playerConfig.getBoolean("shiftClick");
|
||||||
|
doubleClick = playerConfig.getBoolean("doubleClick");
|
||||||
|
shiftRightClick = playerConfig.getBoolean("shiftRightClick");
|
||||||
}
|
}
|
||||||
|
|
||||||
JeffChestSortPlayerSetting newSettings = new JeffChestSortPlayerSetting(activeForThisPlayer);
|
JeffChestSortPlayerSetting newSettings = new JeffChestSortPlayerSetting(activeForThisPlayer,middleClick,shiftClick,doubleClick,shiftRightClick);
|
||||||
|
|
||||||
// when "show-message-again-after-logout" is enabled, we don't care if the
|
// when "show-message-again-after-logout" is enabled, we don't care if the
|
||||||
// player already saw the message
|
// player already saw the message
|
||||||
@ -271,16 +286,18 @@ public class JeffChestSortListener implements Listener {
|
|||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||||
public void onInventoryClickEvent(InventoryClickEvent event) {
|
public void onInventoryClickEvent(InventoryClickEvent event) {
|
||||||
|
|
||||||
if(!plugin.getConfig().getBoolean("allow-hotkeys")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!(event.getWhoClicked() instanceof Player)) {
|
if(!(event.getWhoClicked() instanceof Player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player p = (Player) event.getWhoClicked();
|
Player p = (Player) event.getWhoClicked();
|
||||||
|
|
||||||
|
registerPlayerIfNeeded(p);
|
||||||
|
|
||||||
|
if(!plugin.getConfig().getBoolean("allow-hotkeys")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// DEBUG START
|
// DEBUG START
|
||||||
// p.sendMessage("=====================");
|
// p.sendMessage("=====================");
|
||||||
// p.sendMessage("Click type: " + event.getClick().name());
|
// p.sendMessage("Click type: " + event.getClick().name());
|
||||||
@ -301,14 +318,23 @@ public class JeffChestSortListener implements Listener {
|
|||||||
|
|
||||||
boolean sort = false;
|
boolean sort = false;
|
||||||
|
|
||||||
|
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(p.getUniqueId().toString());
|
||||||
|
|
||||||
|
// Do not sort the GUI inventory
|
||||||
|
if(event.getClickedInventory() == setting.guiInventory) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(event.getClick()) {
|
switch(event.getClick()) {
|
||||||
case MIDDLE:
|
case MIDDLE:
|
||||||
if(plugin.getConfig().getBoolean("hotkeys.middle-click")) {
|
//if(plugin.getConfig().getBoolean("hotkeys.middle-click")) {
|
||||||
|
if(setting.middleClick) {
|
||||||
sort=true;
|
sort=true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DOUBLE_CLICK:
|
case DOUBLE_CLICK:
|
||||||
if(plugin.getConfig().getBoolean("hotkeys.double-click")) {
|
//if(plugin.getConfig().getBoolean("hotkeys.double-click")) {
|
||||||
|
if(setting.doubleClick) {
|
||||||
// We need getCursor() instead of getCurrentItem(), because after picking up the item, it is gone into the cursor
|
// We need getCursor() instead of getCurrentItem(), because after picking up the item, it is gone into the cursor
|
||||||
if(event.getCursor() == null || (event.getCursor() != null && event.getCursor().getType() == Material.AIR)) {
|
if(event.getCursor() == null || (event.getCursor() != null && event.getCursor().getType() == Material.AIR)) {
|
||||||
sort=true;
|
sort=true;
|
||||||
@ -316,14 +342,16 @@ public class JeffChestSortListener implements Listener {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHIFT_LEFT:
|
case SHIFT_LEFT:
|
||||||
if(plugin.getConfig().getBoolean("hotkeys.shift-click")) {
|
//if(plugin.getConfig().getBoolean("hotkeys.shift-click")) {
|
||||||
|
if(setting.shiftClick) {
|
||||||
if(event.getCurrentItem() == null || (event.getCurrentItem() != null && event.getCurrentItem().getType() == Material.AIR) ){
|
if(event.getCurrentItem() == null || (event.getCurrentItem() != null && event.getCurrentItem().getType() == Material.AIR) ){
|
||||||
sort=true;
|
sort=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHIFT_RIGHT:
|
case SHIFT_RIGHT:
|
||||||
if(plugin.getConfig().getBoolean("hotkeys.shift-right-click")) {
|
//if(plugin.getConfig().getBoolean("hotkeys.shift-right-click")) {
|
||||||
|
if(setting.shiftRightClick) {
|
||||||
if(event.getCurrentItem() == null || ( event.getCurrentItem() != null && event.getCurrentItem().getType() == Material.AIR)) {
|
if(event.getCurrentItem() == null || ( event.getCurrentItem() != null && event.getCurrentItem().getType() == Material.AIR)) {
|
||||||
sort=true;
|
sort=true;
|
||||||
}
|
}
|
||||||
@ -375,4 +403,54 @@ public class JeffChestSortListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
void onGUIInteract(InventoryClickEvent event) {
|
||||||
|
if(plugin.hotkeyGUI==false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!(event.getWhoClicked() instanceof Player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Player p = (Player) event.getWhoClicked();
|
||||||
|
registerPlayerIfNeeded(p);
|
||||||
|
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(p.getUniqueId().toString());
|
||||||
|
|
||||||
|
if(setting.guiInventory==null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(event.getClickedInventory()==null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!event.getClickedInventory().equals(setting.guiInventory)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We only get this far if the player has clicked inside his GUI inventory
|
||||||
|
event.setCancelled(true);
|
||||||
|
if(event.getClick() != ClickType.LEFT) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(event.getSlot() == JeffChestSortSettingsGUI.slotMiddleClick) {
|
||||||
|
setting.middleClick = !setting.middleClick;
|
||||||
|
plugin.settingsGUI.openGUI(p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(event.getSlot() == JeffChestSortSettingsGUI.slotShiftClick) {
|
||||||
|
setting.shiftClick = !setting.shiftClick;
|
||||||
|
plugin.settingsGUI.openGUI(p);
|
||||||
|
return;
|
||||||
|
} else if(event.getSlot() == JeffChestSortSettingsGUI.slotDoubleClick) {
|
||||||
|
setting.doubleClick = !setting.doubleClick;
|
||||||
|
plugin.settingsGUI.openGUI(p);
|
||||||
|
return;
|
||||||
|
} else if(event.getSlot() == JeffChestSortSettingsGUI.slotShiftRightClick) {
|
||||||
|
setting.shiftRightClick = !setting.shiftRightClick;
|
||||||
|
plugin.settingsGUI.openGUI(p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,10 @@ public class JeffChestSortMessages {
|
|||||||
final String MSG_ACTIVATED, MSG_DEACTIVATED, MSG_COMMANDMESSAGE, MSG_COMMANDMESSAGE2, MSG_PLAYERSONLY,
|
final String MSG_ACTIVATED, MSG_DEACTIVATED, MSG_COMMANDMESSAGE, MSG_COMMANDMESSAGE2, MSG_PLAYERSONLY,
|
||||||
MSG_PLAYERINVSORTED, MSG_INVALIDOPTIONS;
|
MSG_PLAYERINVSORTED, MSG_INVALIDOPTIONS;
|
||||||
|
|
||||||
|
final String MSG_GUI_ENABLED, MSG_GUI_DISABLED;
|
||||||
|
|
||||||
|
final String MSG_GUI_MIDDLECLICK, MSG_GUI_SHIFTCLICK, MSG_GUI_DOUBLECLICK, MSG_GUI_SHIFTRIGHTCLICK;
|
||||||
|
|
||||||
JeffChestSortMessages(JeffChestSortPlugin plugin) {
|
JeffChestSortMessages(JeffChestSortPlugin plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
|
||||||
@ -39,6 +43,26 @@ public class JeffChestSortMessages {
|
|||||||
|
|
||||||
MSG_INVALIDOPTIONS = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
MSG_INVALIDOPTIONS = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
.getString("message-error-invalid-options", "&cError: Unknown option %s. Valid options are %s."));
|
.getString("message-error-invalid-options", "&cError: Unknown option %s. Valid options are %s."));
|
||||||
|
|
||||||
|
MSG_GUI_ENABLED = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
|
.getString("message-gui-enabled","&aEnabled"));
|
||||||
|
|
||||||
|
MSG_GUI_DISABLED = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
|
.getString("message-gui-disabled","&cDisabled"));
|
||||||
|
|
||||||
|
MSG_GUI_MIDDLECLICK = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
|
.getString("message-gui-middle-click","Middle-Click"));
|
||||||
|
|
||||||
|
MSG_GUI_SHIFTCLICK = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
|
.getString("message-gui-shift-click","Shift + Click"));
|
||||||
|
|
||||||
|
MSG_GUI_DOUBLECLICK = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
|
.getString("message-gui-double-click","Double-Click"));
|
||||||
|
|
||||||
|
MSG_GUI_SHIFTRIGHTCLICK = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
|
||||||
|
.getString("message-gui-shift-right-click","Shift + Right-Click"));
|
||||||
|
|
||||||
|
//MSG_ERR_HOTKEYSDISABLED = ChatColor.RED + "[ChestSort] Hotkeys are only available for Minecraft 1.9 and later.";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package de.jeffclan.JeffChestSort;
|
package de.jeffclan.JeffChestSort;
|
||||||
|
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
public class JeffChestSortPlayerSetting {
|
public class JeffChestSortPlayerSetting {
|
||||||
|
|
||||||
// Represents the information regarding a player
|
// Represents the information regarding a player
|
||||||
@ -10,11 +12,20 @@ public class JeffChestSortPlayerSetting {
|
|||||||
// Sorting enabled for this player?
|
// Sorting enabled for this player?
|
||||||
boolean sortingEnabled;
|
boolean sortingEnabled;
|
||||||
|
|
||||||
|
// Hotkey settings
|
||||||
|
boolean middleClick, shiftClick, doubleClick, shiftRightClick;
|
||||||
|
|
||||||
|
Inventory guiInventory = null;
|
||||||
|
|
||||||
// Did we already show the message how to activate sorting?
|
// Did we already show the message how to activate sorting?
|
||||||
boolean hasSeenMessage = false;
|
boolean hasSeenMessage = false;
|
||||||
|
|
||||||
JeffChestSortPlayerSetting(boolean sortingEnabled) {
|
JeffChestSortPlayerSetting(boolean sortingEnabled, boolean middleClick, boolean shiftClick, boolean doubleClick, boolean shiftRightClick) {
|
||||||
this.sortingEnabled = sortingEnabled;
|
this.sortingEnabled = sortingEnabled;
|
||||||
|
this.middleClick = middleClick;
|
||||||
|
this.shiftClick = shiftClick;
|
||||||
|
this.doubleClick = doubleClick;
|
||||||
|
this.shiftRightClick = shiftRightClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -65,12 +65,14 @@ public class JeffChestSortPlugin extends JavaPlugin {
|
|||||||
JeffChestSortOrganizer organizer;
|
JeffChestSortOrganizer organizer;
|
||||||
JeffChestSortUpdateChecker updateChecker;
|
JeffChestSortUpdateChecker updateChecker;
|
||||||
JeffChestSortListener listener;
|
JeffChestSortListener listener;
|
||||||
|
JeffChestSortSettingsGUI settingsGUI;
|
||||||
String sortingMethod;
|
String sortingMethod;
|
||||||
ArrayList<String> disabledWorlds;
|
ArrayList<String> disabledWorlds;
|
||||||
int currentConfigVersion = 17;
|
int currentConfigVersion = 18;
|
||||||
boolean usingMatchingConfig = true;
|
boolean usingMatchingConfig = true;
|
||||||
boolean debug = false;
|
boolean debug = false;
|
||||||
boolean verbose = true;
|
boolean verbose = true;
|
||||||
|
boolean hotkeyGUI = true;
|
||||||
|
|
||||||
public boolean hookCrackShot = false;
|
public boolean hookCrackShot = false;
|
||||||
public boolean hookInventoryPages = false;
|
public boolean hookInventoryPages = false;
|
||||||
@ -78,6 +80,13 @@ public class JeffChestSortPlugin extends JavaPlugin {
|
|||||||
private long updateCheckInterval = 86400; // in seconds. We check on startup and every 24 hours (if you never
|
private long updateCheckInterval = 86400; // in seconds. We check on startup and every 24 hours (if you never
|
||||||
// restart your server)
|
// restart your server)
|
||||||
|
|
||||||
|
String mcVersion; // 1.13.2 = 1_13_R2
|
||||||
|
// 1.14.4 = 1_14_R1
|
||||||
|
// 1.8.0 = 1_8_R1
|
||||||
|
int mcMinorVersion; // 14 for 1.14, 13 for 1.13, ...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Public API method to sort any given inventory
|
// Public API method to sort any given inventory
|
||||||
public void sortInventory(Inventory inv) {
|
public void sortInventory(Inventory inv) {
|
||||||
this.organizer.sortInventory(inv);
|
this.organizer.sortInventory(inv);
|
||||||
@ -219,6 +228,18 @@ public class JeffChestSortPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
|
String tmpVersion = getServer().getClass().getPackage().getName();
|
||||||
|
mcVersion = tmpVersion.substring(tmpVersion.lastIndexOf('.') + 1);
|
||||||
|
tmpVersion = mcVersion.substring(mcVersion.indexOf("_")+1);
|
||||||
|
mcMinorVersion = Integer.parseInt(tmpVersion.substring(0,tmpVersion.indexOf("_")));
|
||||||
|
|
||||||
|
//getLogger().info("Running MC version 1."+mcMinorVersion);
|
||||||
|
// if(mcMinorVersion < 9) {
|
||||||
|
// getLogger().info("You are running a Minecraft version below 1.9. Hotkey GUI will be disabled.");
|
||||||
|
// hotkeyGUI = false;
|
||||||
|
// }
|
||||||
|
|
||||||
// Create the config file, including checks for old config versions, and load
|
// Create the config file, including checks for old config versions, and load
|
||||||
// the default values for unset options
|
// the default values for unset options
|
||||||
createConfig();
|
createConfig();
|
||||||
@ -250,6 +271,8 @@ public class JeffChestSortPlugin extends JavaPlugin {
|
|||||||
// Organizer will load all category files and will be ready to sort stuff
|
// Organizer will load all category files and will be ready to sort stuff
|
||||||
organizer = new JeffChestSortOrganizer(this);
|
organizer = new JeffChestSortOrganizer(this);
|
||||||
|
|
||||||
|
settingsGUI = new JeffChestSortSettingsGUI(this);
|
||||||
|
|
||||||
// UpdateChecker will check on startup and every 24 hours for new updates (when
|
// UpdateChecker will check on startup and every 24 hours for new updates (when
|
||||||
// enabled)
|
// enabled)
|
||||||
updateChecker = new JeffChestSortUpdateChecker(this);
|
updateChecker = new JeffChestSortUpdateChecker(this);
|
||||||
@ -486,6 +509,10 @@ public class JeffChestSortPlugin extends JavaPlugin {
|
|||||||
YamlConfiguration playerConfig = YamlConfiguration.loadConfiguration(playerFile);
|
YamlConfiguration playerConfig = YamlConfiguration.loadConfiguration(playerFile);
|
||||||
playerConfig.set("sortingEnabled", setting.sortingEnabled);
|
playerConfig.set("sortingEnabled", setting.sortingEnabled);
|
||||||
playerConfig.set("hasSeenMessage", setting.hasSeenMessage);
|
playerConfig.set("hasSeenMessage", setting.hasSeenMessage);
|
||||||
|
playerConfig.set("middleClick",setting.middleClick);
|
||||||
|
playerConfig.set("shiftClick",setting.shiftClick);
|
||||||
|
playerConfig.set("doubleClick",setting.doubleClick);
|
||||||
|
playerConfig.set("shiftRightClick",setting.shiftRightClick);
|
||||||
try {
|
try {
|
||||||
playerConfig.save(playerFile);
|
playerConfig.save(playerFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -0,0 +1,104 @@
|
|||||||
|
package de.jeffclan.JeffChestSort;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
|
public class JeffChestSortSettingsGUI {
|
||||||
|
|
||||||
|
JeffChestSortPlugin plugin;
|
||||||
|
|
||||||
|
public static int slotMiddleClick = 1 + 9;
|
||||||
|
public static int slotShiftClick = 3 + 9;
|
||||||
|
public static int slotDoubleClick = 5 + 9;
|
||||||
|
public static int slotShiftRightClick = 7 + 9;
|
||||||
|
|
||||||
|
final static Material red = Material.REDSTONE_BLOCK;
|
||||||
|
final static Material green = Material.EMERALD_BLOCK;
|
||||||
|
|
||||||
|
enum Hotkey {
|
||||||
|
MiddleClick, ShiftClick, DoubleClick, ShiftRightClick;
|
||||||
|
}
|
||||||
|
|
||||||
|
JeffChestSortSettingsGUI(JeffChestSortPlugin plugin) {
|
||||||
|
this.plugin=plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack getItem(boolean active, Hotkey hotkey) {
|
||||||
|
ItemStack is = null;
|
||||||
|
String suffix;
|
||||||
|
//Material green = Material.getMaterial("GREEN_WOOL");
|
||||||
|
//Material red = Material.getMaterial("RED_WOOL");
|
||||||
|
//Material green = Material.GREEN_WOOL;
|
||||||
|
//Material red = Material.RED_WOOL;
|
||||||
|
|
||||||
|
// if(green==null || red==null) {
|
||||||
|
// //plugin.getLogger().warning("Using unsupported Minecraft version");
|
||||||
|
// green = Material.EMERALD_BLOCK;
|
||||||
|
// red = Material.REDSTONE_BLOCK;
|
||||||
|
// //return null;
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(active) {
|
||||||
|
is = new ItemStack(green);
|
||||||
|
suffix = plugin.messages.MSG_GUI_ENABLED;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
is = new ItemStack(red);
|
||||||
|
suffix = plugin.messages.MSG_GUI_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemMeta meta = is.getItemMeta();
|
||||||
|
|
||||||
|
switch(hotkey) {
|
||||||
|
case MiddleClick:
|
||||||
|
meta.setDisplayName(ChatColor.RESET + plugin.messages.MSG_GUI_MIDDLECLICK + ": " + suffix);
|
||||||
|
break;
|
||||||
|
case ShiftClick:
|
||||||
|
meta.setDisplayName(ChatColor.RESET + plugin.messages.MSG_GUI_SHIFTCLICK + ": " + suffix);
|
||||||
|
break;
|
||||||
|
case DoubleClick:
|
||||||
|
meta.setDisplayName(ChatColor.RESET + plugin.messages.MSG_GUI_DOUBLECLICK + ": " + suffix);
|
||||||
|
break;
|
||||||
|
case ShiftRightClick:
|
||||||
|
meta.setDisplayName(ChatColor.RESET + plugin.messages.MSG_GUI_SHIFTRIGHTCLICK + ": " + suffix);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
is.setItemMeta(meta);
|
||||||
|
|
||||||
|
return is;
|
||||||
|
}
|
||||||
|
|
||||||
|
void openGUI(Player player) {
|
||||||
|
Inventory inventory = createGUI("ChestSort", player);
|
||||||
|
|
||||||
|
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(player.getUniqueId().toString());
|
||||||
|
|
||||||
|
// Test if running 1.13 or later
|
||||||
|
// if(Material.getMaterial("GREEN_WOOL") == null) {
|
||||||
|
// player.sendMessage(plugin.messages.MSG_ERR_HOTKEYSDISABLED);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
inventory.setItem(slotMiddleClick, getItem(setting.middleClick,Hotkey.MiddleClick));
|
||||||
|
inventory.setItem(slotShiftClick, getItem(setting.shiftClick,Hotkey.ShiftClick));
|
||||||
|
inventory.setItem(slotDoubleClick, getItem(setting.doubleClick,Hotkey.DoubleClick));
|
||||||
|
inventory.setItem(slotShiftRightClick, getItem(setting.shiftRightClick,Hotkey.ShiftRightClick));
|
||||||
|
|
||||||
|
setting.guiInventory = inventory;
|
||||||
|
player.openInventory(inventory);
|
||||||
|
}
|
||||||
|
|
||||||
|
Inventory createGUI(String name, Player inventoryHolder) {
|
||||||
|
Inventory inventory = Bukkit.createInventory(inventoryHolder, InventoryType.CHEST, name);
|
||||||
|
return inventory;
|
||||||
|
}
|
||||||
|
}
|
@ -71,6 +71,7 @@ allow-hotkeys: true
|
|||||||
# You can disable/enable certain hotkeys when you have allow-hotkeys enabled.
|
# You can disable/enable certain hotkeys when you have allow-hotkeys enabled.
|
||||||
# Hotkeys that could interfere with Minecraft's normal behaviour (e.g.
|
# Hotkeys that could interfere with Minecraft's normal behaviour (e.g.
|
||||||
# shift+left-click) only work on empty slots, so don't worry about them.
|
# shift+left-click) only work on empty slots, so don't worry about them.
|
||||||
|
# Players can also enable/disable all shortcuts individually via /chestsort settings
|
||||||
hotkeys:
|
hotkeys:
|
||||||
# Use middle click (mousewheel) on ANY inventory slot as hotkey
|
# Use middle click (mousewheel) on ANY inventory slot as hotkey
|
||||||
middle-click: true
|
middle-click: true
|
||||||
@ -199,6 +200,12 @@ message-sorting-enabled: "&7Automatic chest sorting has been &aenabled&7."
|
|||||||
message-player-inventory-sorted: "&7Your inventory has been sorted."
|
message-player-inventory-sorted: "&7Your inventory has been sorted."
|
||||||
message-error-players-only: "&cError: This command can only be run by players."
|
message-error-players-only: "&cError: This command can only be run by players."
|
||||||
message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
||||||
|
message-gui-enabled: "&aEnabled"
|
||||||
|
message-gui-disabled: "&cDisabled"
|
||||||
|
message-gui-middle-click: "Middle-Click"
|
||||||
|
message-gui-shift-click: "Shift + Click"
|
||||||
|
message-gui-double-click: "Double-Click"
|
||||||
|
message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### English
|
##### English
|
||||||
#message-when-using-chest: "&7Hint: Type &6/chestsort&7 to enable automatic chest sorting."
|
#message-when-using-chest: "&7Hint: Type &6/chestsort&7 to enable automatic chest sorting."
|
||||||
@ -208,8 +215,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Your inventory has been sorted."
|
#message-player-inventory-sorted: "&7Your inventory has been sorted."
|
||||||
#message-error-players-only: "&cError: This command can only be run by players."
|
#message-error-players-only: "&cError: This command can only be run by players."
|
||||||
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Chinese - Thanks to qsefthuopq for translating! -> https://www.spigotmc.org/members/qsefthuopq.339953/
|
##### Chinese - Thanks to qsefthuopq for translating! -> https://www.spigotmc.org/members/qsefthuopq.339953/
|
||||||
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7提示: 输入 &6/chestsort&7 来启用自动整理箱子."
|
#message-when-using-chest: "&7提示: 输入 &6/chestsort&7 来启用自动整理箱子."
|
||||||
#message-when-using-chest2: "&7提示: 输入 &6/chestsort&7 来关闭自动整理箱子."
|
#message-when-using-chest2: "&7提示: 输入 &6/chestsort&7 来关闭自动整理箱子."
|
||||||
#message-sorting-disabled: "&7自动整理箱子已 &c关闭&7."
|
#message-sorting-disabled: "&7自动整理箱子已 &c关闭&7."
|
||||||
@ -217,9 +231,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7已成功整理你的背包."
|
#message-player-inventory-sorted: "&7已成功整理你的背包."
|
||||||
#message-error-players-only: "&c错误: 指令只能由玩家运行."
|
#message-error-players-only: "&c错误: 指令只能由玩家运行."
|
||||||
#message-error-invalid-options: "&c错误: 位置选项 %s. 有效选项为 %s."
|
#message-error-invalid-options: "&c错误: 位置选项 %s. 有效选项为 %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Chinese (Traditional) 繁體中文
|
##### Chinese (Traditional) 繁體中文
|
||||||
##### Note: the last two messages are still untranslated. Please send me your translation at SpigotMC
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7小提醒: 輸入 &6/chestsort&7 來開啟自動整理箱子"
|
#message-when-using-chest: "&7小提醒: 輸入 &6/chestsort&7 來開啟自動整理箱子"
|
||||||
#message-when-using-chest2: "&7小提醒: 輸入 &6/chestsort&7 來關閉自動整理箱子"
|
#message-when-using-chest2: "&7小提醒: 輸入 &6/chestsort&7 來關閉自動整理箱子"
|
||||||
#message-sorting-disabled: "&7自動整理箱子已 &c關閉&7"
|
#message-sorting-disabled: "&7自動整理箱子已 &c關閉&7"
|
||||||
@ -227,8 +247,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7你的背包已成功整理."
|
#message-player-inventory-sorted: "&7你的背包已成功整理."
|
||||||
#message-error-players-only: "&c錯誤: 這個指令只能由玩家使用"
|
#message-error-players-only: "&c錯誤: 這個指令只能由玩家使用"
|
||||||
#message-error-invalid-options: "&c錯誤: 未知選項 %s. 有效的選項為 %s."
|
#message-error-invalid-options: "&c錯誤: 未知選項 %s. 有效的選項為 %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Dutch - Thanks to Xeyame for translating! -> https://github.com/Xeyame
|
##### Dutch - Thanks to Xeyame for translating! -> https://github.com/Xeyame
|
||||||
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Hint: Gebruik &6/chestsort&7 om automatische kist sortering aan te zetten."
|
#message-when-using-chest: "&7Hint: Gebruik &6/chestsort&7 om automatische kist sortering aan te zetten."
|
||||||
#message-when-using-chest2: "&7Hint: Gebruik &6/chestsort&7 om automatische kist sortering uit te zetten."
|
#message-when-using-chest2: "&7Hint: Gebruik &6/chestsort&7 om automatische kist sortering uit te zetten."
|
||||||
#message-sorting-disabled: "&7Automatische kist sortering is &cuitgeschakeld&7."
|
#message-sorting-disabled: "&7Automatische kist sortering is &cuitgeschakeld&7."
|
||||||
@ -236,9 +263,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Je inventaris is gesorteerd."
|
#message-player-inventory-sorted: "&7Je inventaris is gesorteerd."
|
||||||
#message-error-players-only: "&cFout: Dit commando kan alleen door spelers worden gebruikt."
|
#message-error-players-only: "&cFout: Dit commando kan alleen door spelers worden gebruikt."
|
||||||
#message-error-invalid-options: "&cFout: Onbekende optie %s. Mogelijke opties zijn %s."
|
#message-error-invalid-options: "&cFout: Onbekende optie %s. Mogelijke opties zijn %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### French - Thanks to automatizer for translating! -> https://www.spigotmc.org/members/automatizer.26188/
|
##### French - Thanks to automatizer for translating! -> https://www.spigotmc.org/members/automatizer.26188/
|
||||||
##### Note: the last two messages are still untranslated. Please send me your translation at SpigotMC
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Astuce: Écris &6/chestsort&7 pour activer le classement automatique."
|
#message-when-using-chest: "&7Astuce: Écris &6/chestsort&7 pour activer le classement automatique."
|
||||||
#message-when-using-chest2: "&7Astuce: Écris &6/chestsort&7 pour désactiver le classement automatique."
|
#message-when-using-chest2: "&7Astuce: Écris &6/chestsort&7 pour désactiver le classement automatique."
|
||||||
#message-sorting-disabled: "&7Le classement automatique a été &cdésactivé&7."
|
#message-sorting-disabled: "&7Le classement automatique a été &cdésactivé&7."
|
||||||
@ -246,6 +279,12 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Your inventory has been sorted."
|
#message-player-inventory-sorted: "&7Your inventory has been sorted."
|
||||||
#message-error-players-only: "&cErreur: Cette commande ne peut être utilisée que par des joueurs."
|
#message-error-players-only: "&cErreur: Cette commande ne peut être utilisée que par des joueurs."
|
||||||
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### German
|
##### German
|
||||||
#message-when-using-chest: "&7Hinweis: Benutze &6/chestsort&7 um die automatische Kistensortierung zu aktivieren."
|
#message-when-using-chest: "&7Hinweis: Benutze &6/chestsort&7 um die automatische Kistensortierung zu aktivieren."
|
||||||
@ -255,8 +294,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Dein Inventar wurde sortiert."
|
#message-player-inventory-sorted: "&7Dein Inventar wurde sortiert."
|
||||||
#message-error-players-only: "&cFehler: Dieser Befehl ist nur für Spieler verfügbar."
|
#message-error-players-only: "&cFehler: Dieser Befehl ist nur für Spieler verfügbar."
|
||||||
#message-error-invalid-options: "&cFehler: Unbekannte Option %s. Gültige Optionen sind %s."
|
#message-error-invalid-options: "&cFehler: Unbekannte Option %s. Gültige Optionen sind %s."
|
||||||
|
#message-gui-enabled: "&aAktiviert"
|
||||||
|
#message-gui-disabled: "&cDeaktiviert"
|
||||||
|
#message-gui-middle-click: "Mittel-Klick"
|
||||||
|
#message-gui-shift-click: "Shift + Klick"
|
||||||
|
#message-gui-double-click: "Doppelklick"
|
||||||
|
#message-gui-shift-right-click: "Shift + Rechtsklick"
|
||||||
|
|
||||||
##### Italian - Translated with Google. Please tell me if something is wrong :)
|
##### Italian
|
||||||
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Nota: inserire &6/chestsort&7 per abilitare l'ordinamento automatico dei bauli."
|
#message-when-using-chest: "&7Nota: inserire &6/chestsort&7 per abilitare l'ordinamento automatico dei bauli."
|
||||||
#message-when-using-chest2: "&7Nota: inserire &6/chestsort&7 per disabilitare l'ordinamento automatico dei bauli."
|
#message-when-using-chest2: "&7Nota: inserire &6/chestsort&7 per disabilitare l'ordinamento automatico dei bauli."
|
||||||
#message-sorting-disabled: "&7L'ordinamento automatico dei bauli è stato &cdisattivato&7."
|
#message-sorting-disabled: "&7L'ordinamento automatico dei bauli è stato &cdisattivato&7."
|
||||||
@ -264,9 +310,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Il tuo inventario è stato ordinato."
|
#message-player-inventory-sorted: "&7Il tuo inventario è stato ordinato."
|
||||||
#message-error-players-only: "&cErrore: questo comando è disponibile solo per i giocatori."
|
#message-error-players-only: "&cErrore: questo comando è disponibile solo per i giocatori."
|
||||||
#message-error-invalid-options: "&cErrore: Parametro sconosciuto %s. I parametri validi sono %s."
|
#message-error-invalid-options: "&cErrore: Parametro sconosciuto %s. I parametri validi sono %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Japanese
|
##### Japanese
|
||||||
##### Note: the last two messages are still untranslated. Please send me your translation at SpigotMC
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7ヒント: &6/chestsort&7 と入力して自動チェスト整理を有効にできます。"
|
#message-when-using-chest: "&7ヒント: &6/chestsort&7 と入力して自動チェスト整理を有効にできます。"
|
||||||
#message-when-using-chest2: "&7ヒント: &6/chestsort&7 と入力すると自動チェスト整理を無効にできます。"
|
#message-when-using-chest2: "&7ヒント: &6/chestsort&7 と入力すると自動チェスト整理を無効にできます。"
|
||||||
#message-sorting-disabled: "&7自動チェスト整理は現在 &cOFF&7です。"
|
#message-sorting-disabled: "&7自動チェスト整理は現在 &cOFF&7です。"
|
||||||
@ -274,9 +326,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-error-players-only: "&cエラー: このコマンドはプレイヤーのみ実行できます。"
|
#message-error-players-only: "&cエラー: このコマンドはプレイヤーのみ実行できます。"
|
||||||
#message-player-inventory-sorted: "&7Your inventory has been sorted."
|
#message-player-inventory-sorted: "&7Your inventory has been sorted."
|
||||||
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Portuguese - Thanks to wildastral for translating! -> https://www.spigotmc.org/members/wildastral.673147/
|
##### Portuguese - Thanks to wildastral for translating! -> https://www.spigotmc.org/members/wildastral.673147/
|
||||||
##### Note: the last two messages are still untranslated. Please send me your translation at SpigotMC
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Dica: Digite &6/chestsort&7 para habilitar a organização automática."
|
#message-when-using-chest: "&7Dica: Digite &6/chestsort&7 para habilitar a organização automática."
|
||||||
#message-when-using-chest2: "&7Dica: Digite &6/chestsort&7 para desabilitar a organização automática."
|
#message-when-using-chest2: "&7Dica: Digite &6/chestsort&7 para desabilitar a organização automática."
|
||||||
#message-sorting-disabled: "&7A Organização automática de baús foi &cdesabilitada&7."
|
#message-sorting-disabled: "&7A Organização automática de baús foi &cdesabilitada&7."
|
||||||
@ -284,8 +342,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Seu inventário foi organizado."
|
#message-player-inventory-sorted: "&7Seu inventário foi organizado."
|
||||||
#message-error-players-only: "&cErro: Esse comando não pode ser executado por jogadores."
|
#message-error-players-only: "&cErro: Esse comando não pode ser executado por jogadores."
|
||||||
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
#message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Russian - Thanks to Gandon for translating! -> https://www.spigotmc.org/members/gandon.443887/
|
##### Russian - Thanks to Gandon for translating! -> https://www.spigotmc.org/members/gandon.443887/
|
||||||
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Подсказка: введите &6/chestsort&7, чтобы включить автоматическую сортировку вещей в сундуках."
|
#message-when-using-chest: "&7Подсказка: введите &6/chestsort&7, чтобы включить автоматическую сортировку вещей в сундуках."
|
||||||
#message-when-using-chest2: "&7Подсказка: введите &6/chestsort&7, чтобы отключить автоматическую сортировку вещей в сундуках."
|
#message-when-using-chest2: "&7Подсказка: введите &6/chestsort&7, чтобы отключить автоматическую сортировку вещей в сундуках."
|
||||||
#message-sorting-disabled: "&7Автоматическая сортировка вещей в сундуках была &cотключена&7."
|
#message-sorting-disabled: "&7Автоматическая сортировка вещей в сундуках была &cотключена&7."
|
||||||
@ -293,8 +358,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Ваш инвентарь был отсортирован."
|
#message-player-inventory-sorted: "&7Ваш инвентарь был отсортирован."
|
||||||
#message-error-players-only: "&cОшибка: эта команда может быть использована только игроками."
|
#message-error-players-only: "&cОшибка: эта команда может быть использована только игроками."
|
||||||
#message-error-invalid-options: "&cОшибка: Неизвестная опция %s. Допустимые опции: %s."
|
#message-error-invalid-options: "&cОшибка: Неизвестная опция %s. Допустимые опции: %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Spanish - Thanks to Bers_ for translating! -> https://www.spigotmc.org/members/bers_.146126/
|
##### Spanish - Thanks to Bers_ for translating! -> https://www.spigotmc.org/members/bers_.146126/
|
||||||
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Pista: Usa &6/chestsort&7 para activar el orden automático de los cofres."
|
#message-when-using-chest: "&7Pista: Usa &6/chestsort&7 para activar el orden automático de los cofres."
|
||||||
#message-when-using-chest2: "&7Pista: Usa &6/chestsort&7 para desactivar el orden automático de los cofres."
|
#message-when-using-chest2: "&7Pista: Usa &6/chestsort&7 para desactivar el orden automático de los cofres."
|
||||||
#message-sorting-disabled: "&7Orden automático de los cofres &cdesactivado&7."
|
#message-sorting-disabled: "&7Orden automático de los cofres &cdesactivado&7."
|
||||||
@ -302,8 +374,15 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Tu inventario ha sido ordenado."
|
#message-player-inventory-sorted: "&7Tu inventario ha sido ordenado."
|
||||||
#message-error-players-only: "&cError: Este comando solo puede ser ejecutado por jugadores."
|
#message-error-players-only: "&cError: Este comando solo puede ser ejecutado por jugadores."
|
||||||
#message-error-invalid-options: "&cError: %s es una opción inválida. Las opciones válidas son: %s."
|
#message-error-invalid-options: "&cError: %s es una opción inválida. Las opciones válidas son: %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
##### Turkish - Thanks to bertek41 for translating!-> https://www.spigotmc.org/members/bertek41.247705/
|
##### Turkish - Thanks to bertek41 for translating!-> https://www.spigotmc.org/members/bertek41.247705/
|
||||||
|
##### Note: Some messages are still untranslated. Please send me your translation at SpigotMC
|
||||||
#message-when-using-chest: "&7Ipucu: &6/chestsort&7 Yazarak Otomatik Sandık Organizasyon Sistemini Aktif Edebilirsin."
|
#message-when-using-chest: "&7Ipucu: &6/chestsort&7 Yazarak Otomatik Sandık Organizasyon Sistemini Aktif Edebilirsin."
|
||||||
#message-when-using-chest2: "&7Ipucu: &6/chestsort&7 Yazarak Otomatik Sandık Organizasyon Sistemini Kapatabilirsin."
|
#message-when-using-chest2: "&7Ipucu: &6/chestsort&7 Yazarak Otomatik Sandık Organizasyon Sistemini Kapatabilirsin."
|
||||||
#message-sorting-disabled: "&7Otomatik Sandık Organizasyonu &cKapatıldı&7."
|
#message-sorting-disabled: "&7Otomatik Sandık Organizasyonu &cKapatıldı&7."
|
||||||
@ -311,10 +390,16 @@ message-error-invalid-options: "&cError: Unknown option %s. Valid options are %s
|
|||||||
#message-player-inventory-sorted: "&7Envanteriniz Düzenlendi."
|
#message-player-inventory-sorted: "&7Envanteriniz Düzenlendi."
|
||||||
#message-error-players-only: "&cHata: Bu Komut Yalnızca Oyuncular Tarafından Kullanılabilir."
|
#message-error-players-only: "&cHata: Bu Komut Yalnızca Oyuncular Tarafından Kullanılabilir."
|
||||||
#message-error-invalid-options: "&cHata: Bilinmeyen Ayar %s."
|
#message-error-invalid-options: "&cHata: Bilinmeyen Ayar %s."
|
||||||
|
#message-gui-enabled: "&aEnabled"
|
||||||
|
#message-gui-disabled: "&cDisabled"
|
||||||
|
#message-gui-middle-click: "Middle-Click"
|
||||||
|
#message-gui-shift-click: "Shift + Click"
|
||||||
|
#message-gui-double-click: "Double-Click"
|
||||||
|
#message-gui-shift-right-click: "Shift + Right-Click"
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
##### Done! #####
|
##### Done! #####
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
# please do not change the following line manually!
|
# please do not change the following line manually!
|
||||||
config-version: 17
|
config-version: 18
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
||||||
name: ChestSort
|
name: ChestSort
|
||||||
version: 6.4.5
|
version: 7.0
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
description: Allows automatic chest sorting
|
description: Allows automatic chest sorting
|
||||||
author: mfnalex
|
author: mfnalex
|
||||||
@ -11,7 +11,7 @@ loadbefore: [InvUnload]
|
|||||||
softdepend: [CrackShot, InventoryPages]
|
softdepend: [CrackShot, InventoryPages]
|
||||||
commands:
|
commands:
|
||||||
chestsort:
|
chestsort:
|
||||||
description: Toggle automatic chest sorting
|
description: Toggle automatic chest sorting.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
aliases: sort
|
aliases: sort
|
||||||
permission: chestsort.use
|
permission: chestsort.use
|
||||||
|
Loading…
Reference in New Issue
Block a user