44import static com .earth2me .essentials .I18n .tl ;
55import com .earth2me .essentials .User ;
66import com .earth2me .essentials .UserMap ;
7+ import com .earth2me .essentials .craftbukkit .BanLookup ;
78import com .earth2me .essentials .utils .DateUtil ;
89import com .earth2me .essentials .utils .FormatUtil ;
910import com .earth2me .essentials .utils .StringUtil ;
10- import java .text .DateFormat ;
1111import java .util .ArrayList ;
1212import java .util .Date ;
1313import java .util .List ;
1414import org .bukkit .BanList ;
15- import org .bukkit .Bukkit ;
1615import java .util .UUID ;
1716import org .bukkit .BanEntry ;
1817import org .bukkit .Location ;
@@ -64,9 +63,9 @@ else if (ess.getServer().getBanList(BanList.Type.IP).isBanned(args[0]))
6463 sender .sendMessage (tl ("isIpBanned" , args [0 ]));
6564 return ;
6665 }
67- else if (ess . getServer (). getBanList ( BanList . Type . NAME ). isBanned (args [0 ]))
66+ else if (BanLookup . isBanned (ess , args [0 ]))
6867 {
69- sender .sendMessage (tl ("whoisBanned" , showBan ? ess . getServer (). getBanList ( BanList . Type . NAME ). getBanEntry (args [0 ]).getReason () : tl ("true" )));
68+ sender .sendMessage (tl ("whoisBanned" , showBan ? BanLookup . getBanEntry (ess , args [0 ]).getReason () : tl ("true" )));
7069 return ;
7170 }
7271 else
@@ -145,9 +144,9 @@ private void seenOffline(final Server server, final CommandSource sender, User u
145144 sender .sendMessage (tl ("seenAccounts" , StringUtil .joinListSkip (", " , user .getName (), history )));
146145 }
147146
148- if (user . getBase (). isBanned ())
147+ if (BanLookup . isBanned (ess , user ))
149148 {
150- final BanEntry banEntry = ess . getServer (). getBanList ( BanList . Type . NAME ). getBanEntry (user .getName ());
149+ final BanEntry banEntry = BanLookup . getBanEntry (ess , user .getName ());
151150 final String reason = showBan ? banEntry .getReason () : tl ("true" );
152151 sender .sendMessage (tl ("whoisBanned" , reason ));
153152 if (banEntry .getExpiration () != null )
@@ -161,6 +160,7 @@ private void seenOffline(final Server server, final CommandSource sender, User u
161160 sender .sendMessage (tl ("whoisTempBanned" , expireString ));
162161 }
163162 }
163+
164164 final String location = user .getGeoLocation ();
165165 if (location != null && (!(sender .isPlayer ()) || ess .getUser (sender .getPlayer ()).isAuthorized ("essentials.geoip.show" )))
166166 {
0 commit comments