mirror of
https://github.com/Shiewk/SModeration.git
synced 2026-04-28 05:54:16 +02:00
Added /vanish list command and list vanished players on join
This commit is contained in:
@@ -6,6 +6,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -71,4 +72,8 @@ public abstract class PlayerUtil {
|
||||
}
|
||||
return List.copyOf(names);
|
||||
}
|
||||
|
||||
public static List<String> listPlayerNames(String search) {
|
||||
return StringUtil.copyPartialMatches(search, listPlayerNames(), new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user