mirror of
https://github.com/itHotL/PlayerStats.git
synced 2024-11-22 11:55:17 +01:00
Getting ready for release v1.6!
This commit is contained in:
parent
113a47772e
commit
e76e85020e
@ -6,17 +6,30 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
//This class is just for fun, and adds some silly names for players on my server.
|
||||
//It does not impact the rest of the plugin, and will only be used for the players mentioned in here.
|
||||
/**This class is just for fun, and adds some silly names for players on my server.
|
||||
It does not impact the rest of the plugin, and will only be used for the players mentioned in here.*/
|
||||
public class EasterEggProvider {
|
||||
|
||||
private static boolean isEnabled;
|
||||
private static final Random random;
|
||||
|
||||
static{
|
||||
enable();
|
||||
random = new Random();
|
||||
}
|
||||
|
||||
public static void enable() {
|
||||
isEnabled = true;
|
||||
}
|
||||
public static void disable() {
|
||||
isEnabled = false;
|
||||
}
|
||||
|
||||
public static Component getPlayerName(Player player) {
|
||||
if (!isEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int sillyNumber = getSillyNumber();
|
||||
String playerName = null;
|
||||
switch (player.getUniqueId().toString()) {
|
||||
|
Loading…
Reference in New Issue
Block a user