reupload files

This commit is contained in:
HaHaWTH
2023-07-11 20:45:01 +08:00
parent b014da245d
commit 7e49e26735
465 changed files with 93823 additions and 0 deletions
@@ -0,0 +1,34 @@
package fr.xephi.authme.util;
import org.bukkit.entity.Player;
/**
* Player utilities.
*/
public final class PlayerUtils {
// Utility class
private PlayerUtils() {
}
/**
* Returns the IP of the given player.
*
* @param player The player to return the IP address for
* @return The player's IP address
*/
public static String getPlayerIp(Player player) {
return player.getAddress().getAddress().getHostAddress();
}
/**
* Returns if the player is an NPC or not.
*
* @param player The player to check
* @return True if the player is an NPC, false otherwise
*/
public static boolean isNpc(Player player) {
return player.hasMetadata("NPC");
}
}