3.11.3
This commit is contained in:
+1
-1
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user