Created
June 20, 2011 16:57
-
-
Save EdGruberman/1035990 to your computer and use it in GitHub Desktop.
getPlayer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns player only if it is a full and case insensitive name match. | |
* | |
* @param name Name of player. | |
* @return Player that matches name. | |
*/ | |
static Player getExactPlayer(String name) { | |
Player player = Bukkit.getServer().getPlayer(name); | |
if (player == null) return null; | |
if (!player.getName().equalsIgnoreCase(name)) return null; | |
return player; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment