@Command( aliases = {"biome"}, usage = "", desc = "Print out the name of the biome at the current location", min = 0, max = 0) @CommandPermissions("vanilla.command.biome") public void getBiomeName(CommandContext args, CommandSource source) throws CommandException { if (!(source instanceof Player)) { throw new CommandException("Only a player may call this command."); } Player player = (Player) source; if (!(player.getTransform().getPosition().getWorld().getGenerator() instanceof BiomeGenerator)) { throw new CommandException("This map does not appear to have any biome data."); } Point pos = player.getTransform().getPosition(); Biome biome = pos.getWorld().getBiome(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()); source.sendMessage( plugin.getPrefix(), ChatStyle.BRIGHT_GREEN, "Current biome: ", ChatStyle.WHITE, (biome != null ? biome.getName() : "none")); }