Search in sources :

Example 11 with Minidungeon

use of com.magmaguy.elitemobs.dungeons.Minidungeon in project EliteMobs by MagmaGuy.

the class SetupHandler method setupUnminidungeonCommand.

public static void setupUnminidungeonCommand(Player player, String minidungeonName) {
    Minidungeon minidungeon = Minidungeon.getMinidungeons().get(minidungeonName);
    minidungeon.uninstallSchematicMinidungeon(player);
    player.performCommand("/undo");
}
Also used : Minidungeon(com.magmaguy.elitemobs.dungeons.Minidungeon)

Example 12 with Minidungeon

use of com.magmaguy.elitemobs.dungeons.Minidungeon in project EliteMobs by MagmaGuy.

the class SetupHandler method setupMinidungeonCommand.

public static void setupMinidungeonCommand(Player player, String minidungeonName) {
    Minidungeon minidungeon = Minidungeon.getMinidungeons().get(minidungeonName);
    minidungeon.finalizeMinidungeonInstallation(player, true);
    player.performCommand("/rotate " + minidungeon.getDungeonPackagerConfigFields().getRotation());
    player.performCommand("/paste");
}
Also used : Minidungeon(com.magmaguy.elitemobs.dungeons.Minidungeon)

Example 13 with Minidungeon

use of com.magmaguy.elitemobs.dungeons.Minidungeon in project EliteMobs by MagmaGuy.

the class RelativeCoordinatesCommand method get.

public static void get(Player player, String minidungeonString) {
    Minidungeon minidungeon = Minidungeon.getMinidungeons().get(minidungeonString);
    if (minidungeon == null) {
        player.sendMessage(ChatColorConverter.convert("&8[EliteMobs] &4Minidungeons name " + minidungeonString + " &4isn't valid!"));
        return;
    }
    if (!minidungeon.isInstalled()) {
        player.sendMessage(ChatColorConverter.convert("&8[EliteMobs] &4Minidungeon isn't installed! Can't get the relative location for uninstalled Minidungeons!"));
        return;
    }
    Location anchorpoint = minidungeon.getDungeonPackagerConfigFields().getAnchorPoint();
    if (anchorpoint == null) {
        player.sendMessage(ChatColorConverter.convert("&8[EliteMobs] &4Something went wrong and made the anchor point not valid!"));
        return;
    }
    Vector relativeVector = player.getLocation().clone().subtract(anchorpoint).toVector();
    if (minidungeon.getDungeonPackagerConfigFields().getRotation() != 0)
        GenericRotationMatrixMath.rotateVectorYAxis(minidungeon.getDungeonPackagerConfigFields().getRotation(), anchorpoint, relativeVector);
    String relativePosition = relativeVector.getBlockX() + ", " + relativeVector.getBlockY() + ", " + relativeVector.getBlockZ();
    player.sendMessage(ChatColorConverter.convert("[EliteMobs] Relative position to anchor point of " + minidungeon.getDungeonPackagerConfigFields().getName() + ": " + relativePosition));
}
Also used : Minidungeon(com.magmaguy.elitemobs.dungeons.Minidungeon) Vector(org.bukkit.util.Vector) Location(org.bukkit.Location)

Aggregations

Minidungeon (com.magmaguy.elitemobs.dungeons.Minidungeon)13 WarningMessage (com.magmaguy.elitemobs.utils.WarningMessage)3 Location (org.bukkit.Location)3 InfoMessage (com.magmaguy.elitemobs.utils.InfoMessage)2 Vector (org.bukkit.util.Vector)2 CommandHandler (com.magmaguy.elitemobs.commands.CommandHandler)1 CustomBossesConfig (com.magmaguy.elitemobs.config.custombosses.CustomBossesConfig)1 CustomBossesConfigFields (com.magmaguy.elitemobs.config.custombosses.CustomBossesConfigFields)1 CustomItemsConfig (com.magmaguy.elitemobs.config.customitems.CustomItemsConfig)1 CustomQuestsConfig (com.magmaguy.elitemobs.config.customquests.CustomQuestsConfig)1 CustomSpawnConfig (com.magmaguy.elitemobs.config.customspawns.CustomSpawnConfig)1 CustomTreasureChestsConfig (com.magmaguy.elitemobs.config.customtreasurechests.CustomTreasureChestsConfig)1 DungeonPackagerConfig (com.magmaguy.elitemobs.config.dungeonpackager.DungeonPackagerConfig)1 NPCsConfig (com.magmaguy.elitemobs.config.npcs.NPCsConfig)1 WormholeConfig (com.magmaguy.elitemobs.config.wormholes.WormholeConfig)1 CustomCharts (com.magmaguy.elitemobs.thirdparty.bstats.CustomCharts)1 Placeholders (com.magmaguy.elitemobs.thirdparty.placeholderapi.Placeholders)1 DebugBlockLocation (com.magmaguy.elitemobs.utils.DebugBlockLocation)1 File (java.io.File)1 IOException (java.io.IOException)1