Archived
0

Revise help pages slightly, prevent future NPE in onDisable()

This commit is contained in:
Dico200
2017-06-03 13:53:28 +02:00
parent 1061eb4b59
commit 9ffa46b66f
4 changed files with 30 additions and 38 deletions

View File

@@ -19,7 +19,7 @@ import org.bukkit.event.Listener;
import java.util.*;
@AutoRegisterListener
@Version(major = 3, minor = 2, revision = 8, compatible = 3)
@Version(major = 3, minor = 2, revision = 9, compatible = 3)
public final class BlockPlaceMods implements Module, Listener
{
public static String PREFIX = ChatColor.GRAY + "[" + ChatColor.DARK_GREEN + "BPM" + ChatColor.GRAY + "]"
@@ -62,7 +62,8 @@ public final class BlockPlaceMods implements Module, Listener
Map<String, org.bukkit.command.Command> commandMap = CommandMap.getCommandMap();
for (String alias : getCommandAliases())
{
if (commandMap.get(alias).getClass() == BlockPlaceModsCommand.class)
org.bukkit.command.Command command = commandMap.get(alias);
if (command != null && command.getClass() == BlockPlaceModsCommand.class)
{
commandMap.remove(alias);
}