mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Finalize entity type categorisation
This commit is contained in:
parent
6e536f81ac
commit
658f2a3fc3
@ -60,14 +60,23 @@ import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.type.WallSign;
|
||||
import org.bukkit.entity.Ambient;
|
||||
import org.bukkit.entity.Animals;
|
||||
import org.bukkit.entity.AreaEffectCloud;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Boss;
|
||||
import org.bukkit.entity.EnderCrystal;
|
||||
import org.bukkit.entity.EnderSignal;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.EvokerFangs;
|
||||
import org.bukkit.entity.ExperienceOrb;
|
||||
import org.bukkit.entity.Explosive;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Firework;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.entity.Golem;
|
||||
import org.bukkit.entity.Hanging;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LightningStrike;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.NPC;
|
||||
import org.bukkit.entity.Phantom;
|
||||
@ -594,8 +603,20 @@ public class BukkitUtil extends WorldUtil {
|
||||
case "projectile": {
|
||||
allowedInterfaces.add(Projectile.class);
|
||||
} break;
|
||||
case "decoration": {
|
||||
case "other": {
|
||||
allowedInterfaces.add(ArmorStand.class);
|
||||
allowedInterfaces.add(FallingBlock.class);
|
||||
allowedInterfaces.add(Item.class);
|
||||
allowedInterfaces.add(Explosive.class);
|
||||
allowedInterfaces.add(AreaEffectCloud.class);
|
||||
allowedInterfaces.add(EvokerFangs.class);
|
||||
allowedInterfaces.add(LightningStrike.class);
|
||||
allowedInterfaces.add(ExperienceOrb.class);
|
||||
allowedInterfaces.add(EnderSignal.class);
|
||||
allowedInterfaces.add(Firework.class);
|
||||
} break;
|
||||
case "player": {
|
||||
allowedInterfaces.add(Player.class);
|
||||
} break;
|
||||
default: {
|
||||
PlotSquared.log(Captions.PREFIX + "Unknown entity category requested: " + category);
|
||||
|
@ -82,6 +82,9 @@ public class Debug extends SubCommand {
|
||||
.stream()
|
||||
.filter(category -> category.contains(entityType))
|
||||
.count();
|
||||
if (categoryCount > 0) {
|
||||
return;
|
||||
}
|
||||
player.sendMessage(Captions.PREFIX.getTranslated() + entityType.getName() + " is in " + categoryCount + " categories");
|
||||
});
|
||||
return true;
|
||||
|
@ -37,7 +37,8 @@ public class EntityCategories {
|
||||
public static final EntityCategory HANGING = register("hanging");
|
||||
public static final EntityCategory VILLAGER = register("villager");
|
||||
public static final EntityCategory PROJECTILE = register("projectile");
|
||||
public static final EntityCategory DECORATION = register("decoration");
|
||||
public static final EntityCategory OTHER = register("other");
|
||||
public static final EntityCategory PLAYER = register("player");
|
||||
|
||||
public static EntityCategory register(final String id) {
|
||||
final EntityCategory entityCategory = new EntityCategory(id);
|
||||
|
Loading…
Reference in New Issue
Block a user