This commit is contained in:
okx-code
2021-02-08 01:33:25 +00:00
parent 4e4c9ebc0a
commit 49942e5497
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
} }
group 'sh.okx' group 'sh.okx'
version '3.11.2' version '3.11.3'
repositories { repositories {
mavenCentral() mavenCentral()
@@ -66,7 +66,7 @@ public class PrestigeCommand implements CommandExecutor {
case "gui": case "gui":
Gui gui = Gui.of(player, prestige, rankElement.getNext().getRank(), plugin, false); Gui gui = Gui.of(player, prestige, rankElement.getNext().getRank(), plugin, false);
if (gui == null) { if (gui == null) {
player.sendMessage(ChatColor.RED + "GUI is not available. Check console for more informatiopn."); player.sendMessage(ChatColor.RED + "GUI is not available. Check console for more information.");
return true; return true;
} }
gui.open(player); gui.open(player);
@@ -65,13 +65,13 @@ public class RanksGui {
ItemStack item = get((section, path0) -> Gui.getItem(plugin, section.getConfigurationSection(path0), player, rankElement0), path, rankPath, basePath, null); ItemStack item = get((section, path0) -> Gui.getItem(plugin, section.getConfigurationSection(path0), player, rankElement0), path, rankPath, basePath, null);
inventory.setItem(index++, item); inventory.setItem(index++, item);
if (index > rows * 9) {
throw new IllegalArgumentException("Ranks GUI is too small for the number of ranks. Increase the number of rows on the ranks GUI.");
}
if (index == rowIndex) { if (index == rowIndex) {
rowIndex += 9; rowIndex += 9;
index += 9 - width; index += 9 - width;
} }
if (index > rows * 9) {
throw new IllegalArgumentException("Ranks GUI is too small for the number of ranks. Increase the number of rows on the ranks GUI.");
}
rankElement = rankElement.getNext(); rankElement = rankElement.getNext();
} }