NPE when do some command on offline player

This commit is contained in:
Michel Roux 2012-05-19 21:23:31 +02:00
parent d443b464d4
commit a120301bef
1 changed files with 1 additions and 0 deletions

View File

@ -156,6 +156,7 @@ public class SimplyPlugin extends JavaPlugin {
protected void refreshPlayerPermissions(String player) {
refreshConfig();
if (getServer().getPlayer(player) == null) return;
PermissionAttachment attachment = permissions.get(getServer().getPlayer(player).getName());
for (String key : attachment.getPermissions().keySet()) {
attachment.unsetPermission(key);