3.9-beta.2

This commit is contained in:
okx-code
2020-06-26 23:19:41 +01:00
parent dd81b2432b
commit 55e190a5c2
27 changed files with 617 additions and 272 deletions
@@ -1,6 +1,7 @@
package sh.okx.rankup.commands;
import lombok.RequiredArgsConstructor;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@@ -62,7 +63,12 @@ public class PrestigeCommand implements CommandExecutor {
.send(player);
break;
case "gui":
Gui.of(player, prestige, rankElement.getNext().getRank(), plugin).open(player);
Gui gui = Gui.of(player, prestige, rankElement.getNext().getRank(), plugin);
if (gui == null) {
player.sendMessage(ChatColor.RED + "GUI is not available. Check console for more informatiopn.");
return true;
}
gui.open(player);
break;
case "none":
plugin.getHelper().prestige(player);