本文整理汇总了Java中org.bukkit.Bukkit.getWorld方法的典型用法代码示例。如果您正苦于以下问题:Java Bukkit.getWorld方法的具体用法?Java Bukkit.getWorld怎么用?Java Bukkit.getWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.Bukkit
的用法示例。
在下文中一共展示了Bukkit.getWorld方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EndPortalFaction
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public EndPortalFaction() {
super("EndPortal");
World overworld = Bukkit.getWorld("world");
int maxHeight = overworld.getMaxHeight();
int min = SettingsYML.END_PORTAL_CENTER - SettingsYML.END_PORTAL_RADIUS;
int max = SettingsYML.END_PORTAL_CENTER + SettingsYML.END_PORTAL_RADIUS;
// North East (++)
addClaim(new Claim(this, new Location(overworld, min, 0, min), new Location(overworld, max, maxHeight, max)), null);
// South West (--)
addClaim(new Claim(this, new Location(overworld, -max, maxHeight, -max), new Location(overworld, -min, 0, -min)), null);
// North West (-+)
addClaim(new Claim(this, new Location(overworld, -max, 0, min), new Location(overworld, -min, maxHeight, max)), null);
// South East (+-)
addClaim(new Claim(this, new Location(overworld, min, 0, -max), new Location(overworld, max, maxHeight, -min)), null);
this.safezone = true;
}
示例2: setWGetWorldProtectionPlayerInteractEntityItemFrame
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldProtectionPlayerInteractEntityItemFrame() {
if (!ConfigGProtection.getConfig().getBoolean("Protection.PlayerInteractEntity-ItemFrame.World.All_World")) {
for (String world : ConfigGProtection.getConfig().getStringList("Protection.PlayerInteractEntity-ItemFrame.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in Server-Protection.yml, Protection.PlayerInteractEntity-ItemFrame.World: "+world);
} else {
worlds_PlayerInteractEntity_ItemFrame.add(world);
}
}
}
}
示例3: setWGetFunQuadrupleJump
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetFunQuadrupleJump() {
if (ConfigFDoubleJump.getConfig().getBoolean("DoubleJump.Quadruple.Enable")) {
if (!ConfigFDoubleJump.getConfig().getBoolean("DoubleJump.Quadruple.World.All_World")) {
for (String world : ConfigFDoubleJump.getConfig().getStringList("DoubleJump.Quadruple.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in DoubleJump.yml, DoubleJump.Quadruple.World: "+world);
} else {
worlds_fun_forjump.add(world);
}
}
}
}
}
示例4: setWGetWorldGamemode
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldGamemode() {
if (ConfigGGM.getConfig().getBoolean("Gamemode.Enable")) {
if (!ConfigGGM.getConfig().getBoolean("Gamemode.World.All_World")) {
for (String world : ConfigGGM.getConfig().getStringList("Gamemode.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in Gamemode-OnJoin.yml, Gamemode.World: "+world);
} else {
worlds_GM.add(world);
}
}
}
}
}
示例5: place
import org.bukkit.Bukkit; //导入方法依赖的package包/类
/**
* Place the waiting lobby in the world
*/
public void place()
{
this.logger.info("Generating lobby...");
if (this.file.exists())
{
try
{
Vector vector = new Vector(0, 190, 0);
World world = Bukkit.getWorld("world");
world.loadChunk(0, 0);
BukkitWorld bwf = new BukkitWorld(world);
this.editSession = new EditSession(bwf, -1);
this.editSession.setFastMode(true);
CuboidClipboard c1 = SchematicFormat.MCEDIT.load(this.file);
c1.paste(this.editSession, vector, true);
}
catch (MaxChangedBlocksException | IOException | DataException ex)
{
this.logger.log(Level.SEVERE, "Error in world", ex);
}
}
else
{
this.logger.severe("File does not exist. Abort...");
}
this.logger.info("Done.");
}
示例6: setWGetWorldJumpPads
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldJumpPads() {
if (ConfigFJumpad.getConfig().getBoolean("JumpPads.Enable")) {
if (!ConfigFJumpad.getConfig().getBoolean("JumpPads.World.All_World")) {
for (String worldWeather : ConfigFJumpad.getConfig().getStringList("JumpPads.World.Worlds")) {
if (Bukkit.getWorld(worldWeather) == null) {
System.out.println("| Invalid world in JumpPads.yml, JumpPads.World: "+worldWeather);
} else {
worlds_jumppads.add(worldWeather);
}
}
}
}
}
示例7: setWGetWorldActionBarJoin
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldActionBarJoin() {
if (ConfigGActionBar.getConfig().getBoolean("ActionBar.Enable")) {
if (!ConfigGActionBar.getConfig().getBoolean("ActionBar.World.All_World")) {
for (String world : ConfigGActionBar.getConfig().getStringList("ActionBar.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in ActionBar-OnJoin.yml, ActionBar.World: "+world);
} else {
worlds_ActionBar_Join.add(world);
}
}
}
}
}
示例8: getWorld
import org.bukkit.Bukkit; //导入方法依赖的package包/类
/**
* Get the Cuboid's world.
*
* @return The World object representing this Cuboid's world
* @throws IllegalStateException if the world is not loaded
*/
public World getWorld() {
World world = Bukkit.getWorld(this.worldName);
if (world == null)
throw new IllegalStateException("World '" + this.worldName + "' is not loaded");
return world;
}
示例9: setWGetWorldProtectionBreak
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldProtectionBreak() {
if (ConfigGProtection.getConfig().getBoolean("Protection.Construct.Break.Enable")) {
if (!ConfigGProtection.getConfig().getBoolean("Protection.Construct.Break.World.All_World")) {
for (String world : ConfigGProtection.getConfig().getStringList("Protection.Construct.Break.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in Server-Protection.yml, Protection.Construct.Break.World: "+world);
} else {
worlds_c_break.add(world);
}
}
}
}
}
示例10: setWGetWorldServerDisableThunderChange
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldServerDisableThunderChange() {
if (ConfigGServerEvent.getConfig().getBoolean("Server.Disable.ThunderChange.Enable")) {
if (!ConfigGServerEvent.getConfig().getBoolean("Server.Disable.ThunderChange.World.All_World")) {
for (String worldWeather : ConfigGServerEvent.getConfig().getStringList("Server.Disable.ThunderChange.World.Worlds")) {
if (Bukkit.getWorld(worldWeather) == null) {
System.out.println("| Invalid world in Server-Event.yml, Server.Disable.ThunderChange.World: "+worldWeather);
} else {
worlds_ThunderChange.add(worldWeather);
}
}
}
}
}
示例11: setWGetWorldMessageOnJoin
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldMessageOnJoin() {
if (ConfigGMessage.getConfig().getBoolean("Message.Join.Enable")) {
if (!ConfigGMessage.getConfig().getBoolean("Message.Join.World.All_World")) {
for (String world : ConfigGMessage.getConfig().getStringList("Message.Join.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in Messages-Chat-OnJoin.yml, Message.Join.World: "+world);
} else {
worlds_message_join.add(world);
}
}
}
}
}
示例12: setWGetDoubleJumpOnJoin
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetDoubleJumpOnJoin() {
if (ConfigGDoubleJumpORFly.getConfig().getBoolean("FD.DoubleJump.Enable")) {
if (!ConfigGDoubleJumpORFly.getConfig().getBoolean("FD.DoubleJump.World.All_World")) {
for (String world : ConfigGDoubleJumpORFly.getConfig().getStringList("FD.DoubleJump.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in DoubleJump-Fly-OnJoin.yml, FD.DoubleJump.World: "+world);
} else {
worlds_fun_doublejump_onjoin.add(world);
}
}
}
}
}
示例13: setWGetWorldHealth
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setWGetWorldHealth() {
if (ConfigGHF.getConfig().getBoolean("Restore.Health.Enable")) {
if (!ConfigGHF.getConfig().getBoolean("Restore.Health.World.All_World")) {
for (String world : ConfigGHF.getConfig().getStringList("Restore.Health.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in Health-Food-OnJoin.yml, Restore.Health.World: "+world);
} else {
worlds_Health.add(world);
}
}
}
}
}
示例14: setPlayerOptionJoin
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public static void setPlayerOptionJoin() {
if (ConfigGPlayerOption.getConfig().getBoolean("PlayerOption.Enable")) {
if (!ConfigGPlayerOption.getConfig().getBoolean("PlayerOption.World.All_World")) {
for (String world : ConfigGPlayerOption.getConfig().getStringList("PlayerOption.World.Worlds")) {
if (Bukkit.getWorld(world) == null) {
System.out.println("| Invalid world in PlayerOption-Other-OnJoin.yml, PlayerOption.World: "+world);
} else {
worlds_playeroption_join.add(world);
}
}
}
}
}
示例15: TestingRegion
import org.bukkit.Bukkit; //导入方法依赖的package包/类
public TestingRegion() {
super("Test Region", new Location(Bukkit.getWorld("world"), 10, 83, 268), new Location(Bukkit.getWorld("world"), 66, 59, 312), 0, 1);
}