4
4
import static com .earth2me .essentials .I18n .tl ;
5
5
import com .earth2me .essentials .User ;
6
6
import com .earth2me .essentials .UserMap ;
7
+ import com .earth2me .essentials .craftbukkit .BanLookup ;
7
8
import com .earth2me .essentials .utils .DateUtil ;
8
9
import com .earth2me .essentials .utils .FormatUtil ;
9
10
import com .earth2me .essentials .utils .StringUtil ;
10
- import java .text .DateFormat ;
11
11
import java .util .ArrayList ;
12
12
import java .util .Date ;
13
13
import java .util .List ;
14
14
import org .bukkit .BanList ;
15
- import org .bukkit .Bukkit ;
16
15
import java .util .UUID ;
17
16
import org .bukkit .BanEntry ;
18
17
import org .bukkit .Location ;
@@ -64,9 +63,9 @@ else if (ess.getServer().getBanList(BanList.Type.IP).isBanned(args[0]))
64
63
sender .sendMessage (tl ("isIpBanned" , args [0 ]));
65
64
return ;
66
65
}
67
- else if (ess . getServer (). getBanList ( BanList . Type . NAME ). isBanned (args [0 ]))
66
+ else if (BanLookup . isBanned (ess , args [0 ]))
68
67
{
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" )));
70
69
return ;
71
70
}
72
71
else
@@ -145,9 +144,9 @@ private void seenOffline(final Server server, final CommandSource sender, User u
145
144
sender .sendMessage (tl ("seenAccounts" , StringUtil .joinListSkip (", " , user .getName (), history )));
146
145
}
147
146
148
- if (user . getBase (). isBanned ())
147
+ if (BanLookup . isBanned (ess , user ))
149
148
{
150
- final BanEntry banEntry = ess . getServer (). getBanList ( BanList . Type . NAME ). getBanEntry (user .getName ());
149
+ final BanEntry banEntry = BanLookup . getBanEntry (ess , user .getName ());
151
150
final String reason = showBan ? banEntry .getReason () : tl ("true" );
152
151
sender .sendMessage (tl ("whoisBanned" , reason ));
153
152
if (banEntry .getExpiration () != null )
@@ -161,6 +160,7 @@ private void seenOffline(final Server server, final CommandSource sender, User u
161
160
sender .sendMessage (tl ("whoisTempBanned" , expireString ));
162
161
}
163
162
}
163
+
164
164
final String location = user .getGeoLocation ();
165
165
if (location != null && (!(sender .isPlayer ()) || ess .getUser (sender .getPlayer ()).isAuthorized ("essentials.geoip.show" )))
166
166
{
0 commit comments