mirror of
https://github.com/Shiewk/SModeration.git
synced 2026-04-28 05:54:16 +02:00
Add Invsee command and permissions
This commit is contained in:
@@ -5,6 +5,7 @@ import de.shiewk.smoderation.punishments.Punishment;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -45,4 +46,13 @@ public abstract class PlayerUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static @Nullable Player findOnlinePlayer(String name){
|
||||
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||
if (onlinePlayer.getName().equalsIgnoreCase(name)){
|
||||
return onlinePlayer;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user