mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-22 07:14:44 +02:00
Start cleaning up the mess we've made of our listeners.
This commit is contained in:
@ -17,6 +17,7 @@ import org.bukkit.plugin.PluginManager;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockDamageEvent;
|
||||
import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent;
|
||||
@ -89,6 +90,14 @@ public class Misc {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isNPC(Player player, PlayerProfile profile) {
|
||||
if (player == null || profile == null || player.hasMetadata("NPC")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
Reference in New Issue
Block a user