small fix

This commit is contained in:
JaTiTV 2021-12-22 21:20:55 +01:00
parent aa306ecb0a
commit c395d2fa67
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.5.14</version>
<version>2.5.15</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@ -100,7 +100,7 @@ public final class Main extends JavaPlugin {
Main.plugin.getPluginLoader().disablePlugin(Main.plugin);
return true;
} else {
if (Double.parseDouble(Objects.requireNonNull(Bukkit.getPluginManager().getPlugin(pl)).getDescription().getVersion()) < ver) {
if (Double.parseDouble(Bukkit.getPluginManager().getPlugin(pl).getDescription().getVersion()) < ver) {
plugin.getLogger().log(Level.SEVERE, "Plugin can not be loaded!");
Bukkit.getConsoleSender().sendMessage(prefix + " §e" + pl + " §4is out of date! This plugin requires at least version §2" + ver + " §4of §6" + pl + " §4Please update it here: §6https://spigotmc.org/resources/" + pl + "." + spigotID + " §4to use this version of " + plugin.getDescription().getName() + ".");
Main.plugin.getPluginLoader().disablePlugin(Main.plugin);