Skip to content

Commit

Permalink
Fix ts User Number
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii committed Jan 6, 2017
1 parent 33611b8 commit 4555c3f
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/me/t0biii/ts/commands/Ts.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,13 @@ else if(args[0].equalsIgnoreCase("getip")){
YamlConfiguration fcfg = YamlConfiguration.loadConfiguration(filterfile);
int anzahl = cfg.getInt("ts.anzahl");
int max = cfg.getInt("ts.max");
int minusfilter = 0;
List<String> filter = fcfg.getStringList("ignore");
List<String> cachelist = cfg.getStringList("ts.cache");

if(!pl.getConfig().getBoolean("options.realtime")){
for(String Users : cachelist){
if(filter.contains(Users)){
minusfilter++;
}
}
prefixsend(p);
p.sendMessage(ChatColor.AQUA+"Teamspeak: "+ tsip + " §cCached");
p.sendMessage(ChatColor.AQUA+"Online: §2"+ (anzahl- minusfilter) +" of " +max);
p.sendMessage(ChatColor.AQUA+"Online: §2"+ (anzahl) +" of " +max);
p.sendMessage(ChatColor.AQUA+"List of People:");
for(String Users : cachelist){
if(!filter.contains(Users)){
Expand All @@ -165,14 +159,9 @@ else if(args[0].equalsIgnoreCase("getip")){
}
prefixsend(p);
}else{
for(Client c : pl.api.getClients()){
if(filter.contains(c.getNickname())){
minusfilter++;
}
}
prefixsend(p);
p.sendMessage(ChatColor.AQUA+"Teamspeak: "+ tsip + " §2Realtime");
p.sendMessage(ChatColor.AQUA+"Online: §2"+ (pl.api.getClients().size()- minusfilter) +" of " + pl.api.getHostInfo().getTotalMaxClients());
p.sendMessage(ChatColor.AQUA+"Online: §2"+ (pl.api.getClients().size()) +" of " + pl.api.getHostInfo().getTotalMaxClients());
p.sendMessage(ChatColor.AQUA+"List of People:");
for (Client c : pl.api.getClients()) {
if(!filter.contains(c.getNickname())){
Expand Down

0 comments on commit 4555c3f

Please sign in to comment.