diff --git a/src/main/java/com/nexia/minigames/games/duels/map/DuelsMap.java b/src/main/java/com/nexia/minigames/games/duels/map/DuelsMap.java index 63af3944..f4db1e58 100644 --- a/src/main/java/com/nexia/minigames/games/duels/map/DuelsMap.java +++ b/src/main/java/com/nexia/minigames/games/duels/map/DuelsMap.java @@ -22,6 +22,8 @@ public class DuelsMap { public String id; + public String name; + public boolean isAdventureSupported; public ItemStack item; @@ -32,27 +34,28 @@ public class DuelsMap { public StructureMap structureMap; - public static final DuelsMap COURTYARD = new DuelsMap("Courtyard", true, Items.LODESTONE, new EntityPos(0.5, 80, 24.5, 180, 0), new EntityPos(0.5, 80, -23.5, 0, 0), new StructureMap(new Identifier("duels", "courtyard"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-70, -10, -70), true)); - public static final DuelsMap COLOSSEUM = new DuelsMap("Colosseum", true, Items.SANDSTONE, new EntityPos(0.5, 80, 24.5, 180, 0), new EntityPos(0.5, 80, -23.5, 0, 0), new StructureMap(new Identifier("duels", "colosseum"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-55, -12, -61), true)); - public static final DuelsMap PLAINS = new DuelsMap("Plains", true, Items.GRASS_BLOCK, new EntityPos(-63.5, 80, -0.5, -90, 0), new EntityPos(64.5, 80, 0.5, 90, 0), new StructureMap(new Identifier("duels", "plains"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-78, -8, -59), true)); - public static final DuelsMap NETHFLAT = new DuelsMap("Neth Flat", true, Items.NETHERITE_BLOCK, new EntityPos(0, 80, -41, 0, 0), new EntityPos(0, 80, 41 ,180, 0), new StructureMap(new Identifier("duels", "nethflat"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-36, -3, -51), true)); - public static final DuelsMap EDEN = new DuelsMap("Eden", false, Items.ALLIUM, new EntityPos(55, 80, 0, 90, 0), new EntityPos(-55, 80, 0, -90, 0), new StructureMap(new Identifier("duels", "eden"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-62, -7, -23), true)); - public static final DuelsMap CASTLE = new DuelsMap("Castle", false, Items.CRACKED_STONE_BRICKS, new EntityPos(0, 240, 25, -180, 0), new EntityPos(0, 240, -25, 0, 0), new StructureMap(new Identifier("duels", "castle"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 238, 0), new BlockPos(-11, -4, -30), true)); - public static final DuelsMap BIGROOM = new DuelsMap("Big Room", true, Items.OAK_PLANKS, new EntityPos(-40.5, 80, 0.5, -90, 0), new EntityPos(41.5, 80, 0.5, 90, 0), new StructureMap(new Identifier("duels", "bigroom"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-50, -16, -65), true)); - public static final DuelsMap CITY = new DuelsMap("city", true, Items.SMOOTH_STONE, new EntityPos(-55, 80, 0, -90, 0), new EntityPos(17, 80, 0, 90, 0), new StructureMap(new Identifier("duels", "city"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-65, -11, -31), true)); + public static final DuelsMap COURTYARD = new DuelsMap("nethflat", "Courtyard", true, Items.LODESTONE, new EntityPos(0.5, 80, 24.5, 180, 0), new EntityPos(0.5, 80, -23.5, 0, 0), new StructureMap(new Identifier("duels", "courtyard"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-70, -10, -70), true)); + public static final DuelsMap COLOSSEUM = new DuelsMap("colosseum", "Colosseum", true, Items.SANDSTONE, new EntityPos(0.5, 80, 24.5, 180, 0), new EntityPos(0.5, 80, -23.5, 0, 0), new StructureMap(new Identifier("duels", "colosseum"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-55, -12, -61), true)); + public static final DuelsMap PLAINS = new DuelsMap("plains", "Plains", true, Items.GRASS_BLOCK, new EntityPos(-63.5, 80, -0.5, -90, 0), new EntityPos(64.5, 80, 0.5, 90, 0), new StructureMap(new Identifier("duels", "plains"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-78, -8, -59), true)); + public static final DuelsMap NETHFLAT = new DuelsMap("nethflat", "Neth Flat", true, Items.NETHERITE_BLOCK, new EntityPos(0, 80, -41, 0, 0), new EntityPos(0, 80, 41 ,180, 0), new StructureMap(new Identifier("duels", "nethflat"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-36, -3, -51), true)); + public static final DuelsMap EDEN = new DuelsMap("eden", "Eden", false, Items.ALLIUM, new EntityPos(55, 80, 0, 90, 0), new EntityPos(-55, 80, 0, -90, 0), new StructureMap(new Identifier("duels", "eden"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-62, -7, -23), true)); + public static final DuelsMap CASTLE = new DuelsMap("castle", "Castle", false, Items.CRACKED_STONE_BRICKS, new EntityPos(0, 240, 25, -180, 0), new EntityPos(0, 240, -25, 0, 0), new StructureMap(new Identifier("duels", "castle"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 238, 0), new BlockPos(-11, -4, -30), true)); + public static final DuelsMap BIGROOM = new DuelsMap("bigroom", "Big Room", true, Items.OAK_PLANKS, new EntityPos(-40.5, 80, 0.5, -90, 0), new EntityPos(41.5, 80, 0.5, 90, 0), new StructureMap(new Identifier("duels", "bigroom"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-50, -16, -65), true)); + public static final DuelsMap CITY = new DuelsMap("city", "City", true, Items.SMOOTH_STONE, new EntityPos(-55, 80, 0, -90, 0), new EntityPos(17, 80, 0, 90, 0), new StructureMap(new Identifier("duels", "city"), StructureMap.Rotation.NO_ROTATION, true, new BlockPos(0, 80, 0), new BlockPos(-65, -11, -31), true)); public static DuelsMap identifyMap(String name) { for(DuelsMap map : DuelsMap.duelsMaps) { - if(map.id.equalsIgnoreCase(name)) return map; + if(map.id.equalsIgnoreCase(name) || map.name.equalsIgnoreCase(name)) return map; } return null; } - public DuelsMap(String id, boolean isAdventureSupported, Item item, EntityPos p1Pos, EntityPos p2Pos, StructureMap structureMap) { + public DuelsMap(String id, String name, boolean isAdventureSupported, Item item, EntityPos p1Pos, EntityPos p2Pos, StructureMap structureMap) { this.id = id; + this.name = name; this.isAdventureSupported = isAdventureSupported; ItemStack itemStack = new ItemStack(item); - itemStack.setHoverName(ObjectMappings.convertComponent(Component.text(id, ChatFormat.Minecraft.white).decoration(ChatFormat.italic, false))); + itemStack.setHoverName(ObjectMappings.convertComponent(Component.text(name, ChatFormat.Minecraft.white).decoration(ChatFormat.italic, false))); itemStack.hideTooltipPart(ItemStack.TooltipPart.MODIFIERS); itemStack.hideTooltipPart(ItemStack.TooltipPart.ADDITIONAL);