mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Fixed NPE in /list
This commit is contained in:
parent
0c4c36b2bd
commit
acd8373f81
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Sat Nov 30 20:40:55 CET 2013
|
#Sun Dec 01 11:54:49 CET 2013
|
||||||
build.number=636
|
build.number=638
|
||||||
|
@ -66,8 +66,8 @@ public class Command_list extends TFM_Command
|
|||||||
|
|
||||||
if (userSuperadmin)
|
if (userSuperadmin)
|
||||||
{
|
{
|
||||||
TFM_Superadmin entry = TFM_SuperadminList.getAdminEntry(player.getName());
|
final TFM_Superadmin entry = TFM_SuperadminList.getAdminEntry(player.getName());
|
||||||
if (!entry.isSeniorAdmin() && entry.isTelnetAdmin())
|
if (entry != null && !entry.isSeniorAdmin() && entry.isTelnetAdmin())
|
||||||
{
|
{
|
||||||
prefix = (ChatColor.DARK_GREEN + "[STA]");
|
prefix = (ChatColor.DARK_GREEN + "[STA]");
|
||||||
}
|
}
|
||||||
|
@ -160,13 +160,13 @@ public class TFM_SuperadminList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TFM_Superadmin getAdminEntry(String admin_name)
|
public static TFM_Superadmin getAdminEntry(String name)
|
||||||
{
|
{
|
||||||
admin_name = admin_name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
|
|
||||||
if (superadminList.containsKey(admin_name))
|
if (superadminList.containsKey(name))
|
||||||
{
|
{
|
||||||
return superadminList.get(admin_name);
|
return superadminList.get(name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -241,6 +241,7 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
catch (Throwable ex)
|
catch (Throwable ex)
|
||||||
{
|
{
|
||||||
TFM_Log.severe("Command Error: " + commandLabel + "\n" + ExceptionUtils.getStackTrace(ex));
|
TFM_Log.severe("Command Error: " + commandLabel + "\n" + ExceptionUtils.getStackTrace(ex));
|
||||||
|
sender.sendMessage(ChatColor.RED + "Command Error: " + ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user