当前位置: 首页>>代码示例>>Java>>正文


Java World.Environment方法代码示例

本文整理汇总了Java中org.bukkit.World.Environment方法的典型用法代码示例。如果您正苦于以下问题:Java World.Environment方法的具体用法?Java World.Environment怎么用?Java World.Environment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.World的用法示例。


在下文中一共展示了World.Environment方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isObfuscated

import org.bukkit.World; //导入方法依赖的package包/类
public static boolean isObfuscated(int id, World.Environment environment) {
    if (id < 0)
        id += 256;

    // Nether case
    if (environment == World.Environment.NETHER) {
        return id == 87 || NetherObfuscateBlocks[id];
    }

    // Normal case
    return id == 1 || ObfuscateBlocks[id];
}
 
开发者ID:SamaGames,项目名称:AntiCheat,代码行数:13,代码来源:OrebfuscatorConfig.java

示例2: createWorld

import org.bukkit.World; //导入方法依赖的package包/类
/**
 * Create World.
 *
 * @param name the name of the world to create
 * @param environment the world Environment
 * @param preGenerate if the world is loaded or not
 */
public void createWorld(@NonNull String name, @NonNull World.Environment environment, boolean preGenerate){
    if (existWorld(name)) {
        plugin.debugLog("Este mundo ya existe");
        return;
    }
    World w = plugin.getServer().createWorld(new WorldCreator(name).environment(environment));
    plugin.debugLog("Mundo creado " + name);
    if (preGenerate){
        generateWorld(w, 500);
    }
    //More
}
 
开发者ID:cadox8,项目名称:WC,代码行数:20,代码来源:WorldManager.java

示例3: GlowstoneMountainFaction

import org.bukkit.World; //导入方法依赖的package包/类
public GlowstoneMountainFaction() {
    super("GlowstoneMountain");

    this.safezone = false;
    for (World world : Bukkit.getWorlds()) {
        int radius = SettingsYML.SPAWN_RADIUS_MAP.get(world.getEnvironment());
        if (radius > 0) {
            addClaim(new Claim(this, new Location(world, radius, 0, radius), new Location(world, -radius, world.getMaxHeight(), -radius)), null);
            final World.Environment environment = world.getEnvironment();
            if (environment != World.Environment.THE_END) {

            }
        }
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:16,代码来源:GlowstoneMountainFaction.java

示例4: NorthRoadFaction

import org.bukkit.World; //导入方法依赖的package包/类
public NorthRoadFaction() {
    super("NorthRoad");
    for (World world : Bukkit.getWorlds()) {
        World.Environment environment = world.getEnvironment();
        if (environment != World.Environment.THE_END) {
            int roadLength = SettingsYML.ROAD_LENGTHS.get(environment);
            int offset = SettingsYML.SPAWN_RADIUS_MAP.get(environment) + 1;
            addClaim(new Claim(this, new Location(world, -ROAD_WIDTH_LEFT, ROAD_MIN_HEIGHT, -offset), new Location(world, ROAD_WIDTH_RIGHT, ROAD_MAX_HEIGHT, -roadLength + ROAD_EDGE_DIFF)),
                    null);
        }
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:13,代码来源:RoadFaction.java

示例5: EastRoadFaction

import org.bukkit.World; //导入方法依赖的package包/类
public EastRoadFaction() {
    super("EastRoad");
    for (World world : Bukkit.getWorlds()) {
        World.Environment environment = world.getEnvironment();
        if (environment != World.Environment.THE_END) {
            int roadLength = SettingsYML.ROAD_LENGTHS.get(environment);
            int offset = SettingsYML.SPAWN_RADIUS_MAP.get(environment) + 1;
            addClaim(new Claim(this, new Location(world, offset, ROAD_MIN_HEIGHT, -ROAD_WIDTH_LEFT), new Location(world, roadLength - ROAD_EDGE_DIFF, ROAD_MAX_HEIGHT, ROAD_WIDTH_RIGHT)), null);
        }
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:12,代码来源:RoadFaction.java

示例6: SouthRoadFaction

import org.bukkit.World; //导入方法依赖的package包/类
public SouthRoadFaction() {
    super("SouthRoad");
    for (World world : Bukkit.getWorlds()) {
        World.Environment environment = world.getEnvironment();
        if (environment != World.Environment.THE_END) {
            int roadLength = SettingsYML.ROAD_LENGTHS.get(environment);
            int offset = SettingsYML.SPAWN_RADIUS_MAP.get(environment) + 1;
            addClaim(new Claim(this, new Location(world, ROAD_WIDTH_LEFT, ROAD_MIN_HEIGHT, offset), new Location(world, -ROAD_WIDTH_RIGHT, ROAD_MAX_HEIGHT, roadLength - ROAD_EDGE_DIFF)), null);
        }
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:12,代码来源:RoadFaction.java

示例7: WestRoadFaction

import org.bukkit.World; //导入方法依赖的package包/类
public WestRoadFaction() {
    super("WestRoad");
    for (World world : Bukkit.getWorlds()) {
        World.Environment environment = world.getEnvironment();
        if (environment != World.Environment.THE_END) {
            int roadLength = SettingsYML.ROAD_LENGTHS.get(environment);
            int offset = SettingsYML.SPAWN_RADIUS_MAP.get(environment) + 1;
            addClaim(new Claim(this, new Location(world, -offset, ROAD_MIN_HEIGHT, ROAD_WIDTH_LEFT), new Location(world, -roadLength + ROAD_EDGE_DIFF, ROAD_MAX_HEIGHT, -ROAD_WIDTH_RIGHT)),
                    null);
        }
    }
}
 
开发者ID:funkemunky,项目名称:HCFCore,代码行数:13,代码来源:RoadFaction.java

示例8: createWorld

import org.bukkit.World; //导入方法依赖的package包/类
public World createWorld(String name, World.Environment environment) {
    return WorldCreator.name(name).environment(environment).createWorld();
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftServer.java

示例9: getRandomBlock

import org.bukkit.World; //导入方法依赖的package包/类
public static int getRandomBlock(int index, boolean alternate, World.Environment environment) {
    if (environment == World.Environment.NETHER)
        return (int) (NetherRandomBlocks[index]);
    return (int) (alternate ? RandomBlocks2[index] : RandomBlocks[index]);
}
 
开发者ID:SamaGames,项目名称:AntiCheat,代码行数:6,代码来源:OrebfuscatorConfig.java

示例10: getRandomBlocks

import org.bukkit.World; //导入方法依赖的package包/类
public static Integer[] getRandomBlocks(boolean alternate, World.Environment environment) {
    if (environment == World.Environment.NETHER)
        return NetherRandomBlocks;
    return (alternate ? RandomBlocks2 : RandomBlocks);
}
 
开发者ID:SamaGames,项目名称:AntiCheat,代码行数:6,代码来源:OrebfuscatorConfig.java


注:本文中的org.bukkit.World.Environment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。