Examples of WorldConfig


Examples of com.khorn.terraincontrol.configuration.WorldConfig

         * int BigLandSize = 2; //default 0, more - smaller
         * int ChanceToIncreaseLand = 6; //default 4
         * int MaxDepth = 10;
         */
        ConfigProvider configs = world.getConfigs();
        WorldConfig worldConfig = configs.getWorldConfig();

        LocalBiome[][] NormalBiomeMap = new LocalBiome[worldConfig.GenerationDepth + 1][];
        LocalBiome[][] IceBiomeMap = new LocalBiome[worldConfig.GenerationDepth + 1][];

        for (int i = 0; i < worldConfig.GenerationDepth + 1; i++)
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WorldConfig

    private int[] getFull(ArraysCache cache, int x, int z, int xSize, int zSize)
    {
        int[] childInts = this.child.getInts(cache, x, z, xSize, zSize);
        int[] riverInts = this.riverLayer.getInts(cache, x, z, xSize, zSize);
        int[] thisInts = cache.getArray(xSize * zSize);
        WorldConfig worldConfig = this.configs.getWorldConfig();

        int currentPiece;
        int currentRiver;
        int cachedId;
        for (int zi = 0; zi < zSize; zi++)
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WorldConfig

    private int[] getWithoutRivers(ArraysCache cache, int x, int z, int xSize, int zSize)
    {
        int[] childInts = this.child.getInts(cache, x, z, xSize, zSize);
        // int[] riverInts = this.riverLayer.GetBiomes(cache, x, z, xSize, zSize);
        int[] thisInts = cache.getArray(xSize * zSize);
        WorldConfig worldConfig = this.configs.getWorldConfig();

        int currentPiece;
        // int currentRiver;
        int cachedId;
        for (int zi = 0; zi < zSize; zi++)
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WorldConfig

    private int[] getOnlyRivers(ArraysCache cache, int x, int z, int xSize, int zSize)
    {
        int[] childInts = this.child.getInts(cache, x, z, xSize, zSize);
        int[] riverInts = this.riverLayer.getInts(cache, x, z, xSize, zSize);
        int[] thisInts = cache.getArray(xSize * zSize);
        WorldConfig worldConfig = this.configs.getWorldConfig();

        int currentPiece;
        int currentRiver;
        int cachedId;
        for (int zi = 0; zi < zSize; zi++)
View Full Code Here

Examples of com.nitnelave.CreeperHeal.config.WorldConfig

            String cmd = args[0];
            if (cmd.equalsIgnoreCase("trap"))
                return PluginHandler.trapCommand(sender, args);

            //the last argument can be a world
            WorldConfig currentWorld = null;
            World w = Bukkit.getWorld(args[args.length - 1]);
            if (w != null)
                currentWorld = CreeperConfig.getWorld(args[args.length - 1]);

            if (currentWorld == null)
View Full Code Here

Examples of com.nitnelave.CreeperHeal.config.WorldConfig

     *            The BlockBurntEvent.
     */
    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onBlockBurn(BlockBurnEvent event)
    {
        WorldConfig world = CreeperConfig.getWorld(event.getBlock().getLocation().getWorld());

        if (world.getBool(WCfgVal.FIRE) && !world.isProtected(event.getBlock())
            && !FactionHandler.shouldIgnore(event.getBlock(), world))
        {
            if (BurntBlockManager.wasRecentlyBurnt(event.getBlock()))
            {
                event.setCancelled(true);
View Full Code Here

Examples of com.nitnelave.CreeperHeal.config.WorldConfig

     */
    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onBlockPlace(BlockPlaceEvent event)
    {
        Player player = event.getPlayer();
        WorldConfig world = CreeperConfig.getWorld(player.getWorld());
        if (event.getBlockPlaced().getType() == Material.TNT
            && !CreeperPermissionManager.checkPermissions(player, false, "bypass.place-tnt"))
        {
            boolean blocked = world.getBool(WCfgVal.BLOCK_TNT);
            if (blocked)
                event.setCancelled(true);
            if (world.getBool(WCfgVal.WARN_TNT))
                CreeperMessenger.warn(CreeperPlayer.WarningCause.TNT, player, blocked, null);
        }
        else if (world.isGriefBlackListed(event.getBlock())
                 && !CreeperPermissionManager.checkPermissions(player, false, "bypass.place-blacklist"))
        {
            boolean blocked = world.getBool(WCfgVal.GRIEF_BLOCK_BLACKLIST);
            if (blocked)
                event.setCancelled(true);
            if (world.getBool(WCfgVal.WARN_BLACKLIST))
                CreeperMessenger.warn(CreeperPlayer.WarningCause.BLACKLIST, player, blocked, event.getBlockPlaced().getType().toString());
        }

    }
View Full Code Here

Examples of com.nitnelave.CreeperHeal.config.WorldConfig

     *            The BlockIgniteEvent.
     */
    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onBlockIgnite(BlockIgniteEvent event)
    {
        WorldConfig world = CreeperConfig.getWorld(event.getBlock().getWorld());

        if (event.getCause() == IgniteCause.SPREAD && world.getBool(WCfgVal.PREVENT_FIRE_SPREAD))
            event.setCancelled(true);
        else if (event.getCause() == IgniteCause.LAVA && world.getBool(WCfgVal.PREVENT_FIRE_LAVA))
            event.setCancelled(true);
    }
View Full Code Here

Examples of com.nitnelave.CreeperHeal.config.WorldConfig

            default:
            }
            if (offender != null && !offender.equals(attacked)
                && !CreeperPermissionManager.checkPermissions(offender, true, "bypass.pvp"))
            {
                WorldConfig world = CreeperConfig.getWorld(event.getEntity().getWorld());
                boolean blocked = world.getBool(WCfgVal.BLOCK_PVP);
                if (blocked)
                    event.setCancelled(true);
                if (world.getBool(WCfgVal.WARN_PVP))
                    CreeperMessenger.warn(CreeperPlayer.WarningCause.PVP, offender, blocked, message);
            }
        }
    }
View Full Code Here

Examples of com.nitnelave.CreeperHeal.config.WorldConfig

     *            The PlayerBucketEmpty event.
     */
    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event)
    {
        WorldConfig world = CreeperConfig.getWorld(event.getPlayer().getWorld());

        Player player = event.getPlayer();
        if (event.getBucket() == Material.LAVA_BUCKET
            && !CreeperPermissionManager.checkPermissions(player, true, "bypass.place-lava"))
        {
            boolean blocked = world.getBool(WCfgVal.BLOCK_LAVA);
            if (blocked)
                event.setCancelled(true);
            if (world.getBool(WCfgVal.WARN_LAVA))
                CreeperMessenger.warn(CreeperPlayer.WarningCause.LAVA, player, blocked, null);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.