geforkt von Mirrors/Paper
Added 'generate-structure' setting support and WorldCreator property.
Fixes BUKKIT-655 and BUKKIT-592 By: Eric Stokes <fernferret@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
378815c162
Commit
b4c3ba3d33
@ -761,6 +761,13 @@ public interface World extends PluginMessageRecipient {
|
|||||||
*/
|
*/
|
||||||
public WorldType getWorldType();
|
public WorldType getWorldType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets whether or not structures are being generated.
|
||||||
|
*
|
||||||
|
* @return True if structures are being generated.
|
||||||
|
*/
|
||||||
|
public boolean canGenerateStructures();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents various map environment types that a world may be
|
* Represents various map environment types that a world may be
|
||||||
*/
|
*/
|
||||||
|
@ -14,6 +14,7 @@ public class WorldCreator {
|
|||||||
private World.Environment environment = World.Environment.NORMAL;
|
private World.Environment environment = World.Environment.NORMAL;
|
||||||
private ChunkGenerator generator = null;
|
private ChunkGenerator generator = null;
|
||||||
private WorldType type = WorldType.NORMAL;
|
private WorldType type = WorldType.NORMAL;
|
||||||
|
private boolean generateStructures = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an empty WorldCreationOptions for the given world name
|
* Creates an empty WorldCreationOptions for the given world name
|
||||||
@ -201,6 +202,26 @@ public class WorldCreator {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether or not worlds created or loaded with this creator will have structures.
|
||||||
|
*
|
||||||
|
* @return This object, for chaining
|
||||||
|
*/
|
||||||
|
public WorldCreator generateStructures(boolean generate) {
|
||||||
|
this.generateStructures = generate;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets whether or not structures will be generated in the world.
|
||||||
|
*
|
||||||
|
* @return True if structures will be generated
|
||||||
|
*/
|
||||||
|
public boolean generateStructures() {
|
||||||
|
return generateStructures;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a world with the specified options.
|
* Creates a world with the specified options.
|
||||||
* <p>
|
* <p>
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren