Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.21.7-R0.1-SNAPSHOT</spigot.version>
<paper.version>1.21.7-R0.1-SNAPSHOT</paper.version>
<paper.version>1.21.8-R0.1-SNAPSHOT</paper.version>
<bentobox.version>3.3.0</bentobox.version> <!-- Errors with later versions regarding kyori-->
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>3.0.1</build.version>
<build.version>3.2.0</build.version>

<sonar.projectKey>BentoBoxWorld_Boxed</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down Expand Up @@ -183,6 +183,12 @@
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc......</groupId>
<artifactId>spigot</artifactId>
<version>1.21.7-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc.....</groupId>
<artifactId>spigot</artifactId>
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/world/bentobox/boxed/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public class Settings implements WorldSettings {
@ConfigComment("Other plugins may override this setting")
@ConfigEntry(path = "world.difficulty")
private Difficulty difficulty = Difficulty.NORMAL;

@ConfigComment("Allow structures to generate in the seed world")
@ConfigEntry(path = "world.allow-structures")
private boolean allowStructures;

@ConfigComment("Spawn limits. These override the limits set in bukkit.yml")
@ConfigComment("If set to a negative number, the server defaults will be used")
Expand Down Expand Up @@ -1801,4 +1805,15 @@ public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) {
this.disallowTeamMemberIslands = disallowTeamMemberIslands;
}

public boolean isAllowStructures() {
return allowStructures;
}

/**
* @param allowStructures the allowStructures to set
*/
public void setAllowStructures(boolean allowStructures) {
this.allowStructures = allowStructures;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ public boolean shouldGenerateMobs() {

@Override
public boolean shouldGenerateStructures() {
return false;
//return this.addon.getSettings().isAllowStructures();
return this.addon.getSettings().isAllowStructures();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package world.bentobox.boxed.nms.v1_21_8_R0_1_SNAPSHOT;

import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_21_R5.CraftWorld;

import net.minecraft.core.BlockPosition;
import net.minecraft.world.level.block.entity.TileEntity;
import world.bentobox.boxed.nms.AbstractMetaData;

public class GetMetaData extends AbstractMetaData {

@Override
public String nmsData(Block block) {
Location w = block.getLocation();
CraftWorld cw = (CraftWorld) w.getWorld(); // CraftWorld is NMS one
// for 1.13+ (we have use WorldServer)
TileEntity te = cw.getHandle().c_(new BlockPosition(w.getBlockX(), w.getBlockY(), w.getBlockZ()));
return getData(te, "getUpdatePacket", "tag");
}

}
2 changes: 1 addition & 1 deletion src/main/resources/locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ boxed:
saved: '&a Placed and saved to structures.yml'
failed: '&c Could not be saved to structures.yml. Check console for error'
unknown: '&c Unknown parameter: [label]'
undo-success: '&a Undone. Some changes cannot be undone.''
undo-success: '&a Undone. Some changes cannot be undone.'
island:
go:
parameters: '[home number]'
Expand Down