- Fix Status Color Bug - Add /playtime - Add /timer
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
package de.npid7.serverlite.TabCompleters;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabCompleter;
|
||||
|
||||
public class PlaytimeCompleter implements TabCompleter {
|
||||
@Override
|
||||
public List<String> onTabComplete(
|
||||
CommandSender sender, Command command, String alias, String[] args) {
|
||||
List<String> completions = new ArrayList<>();
|
||||
if (command.getName().equalsIgnoreCase("playtime")) {
|
||||
if (sender.hasPermission("d7.d7")) {
|
||||
for (OfflinePlayer pl : Bukkit.getOfflinePlayers()) {
|
||||
completions.add(pl.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return completions;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user