Finished Mining restructuring.

This commit is contained in:
gmcferrin
2013-01-09 21:44:53 -05:00
parent fc17448473
commit 1055186e86
5 changed files with 169 additions and 94 deletions

View File

@ -24,6 +24,8 @@ public class Misc {
public static final int TOOL_DURABILITY_LOSS = Config.getInstance().getAbilityToolDamage();
public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5;
public static final int TIME_CONVERSION_FACTOR = 1000;
public static final double SKILL_MESSAGE_MAX_SENDING_DISTANCE = 10.0;
public static boolean isCitizensNPC(Player player) {
if (player == null || Users.getProfile(player) == null || player.hasMetadata("NPC")) {
@ -33,6 +35,14 @@ public class Misc {
return false;
}
public static void sendSkillMessage(Player player, String message) {
for (Player otherPlayer : player.getWorld().getPlayers()) {
if (otherPlayer != player && Misc.isNear(player.getLocation(), otherPlayer.getLocation(), Misc.SKILL_MESSAGE_MAX_SENDING_DISTANCE)) {
otherPlayer.sendMessage(message);
}
}
}
/**
* Gets a capitalized version of the target string.
*