File tree Expand file tree Collapse file tree 5 files changed +47
-5
lines changed
java/world/bentobox/boxed
nms/v1_21_8_R0_1_SNAPSHOT Expand file tree Collapse file tree 5 files changed +47
-5
lines changed Original file line number Diff line number Diff line change 5555 <powermock .version>2.0.9</powermock .version>
5656 <!-- More visible way how to change dependency versions -->
5757 <spigot .version>1.21.7-R0.1-SNAPSHOT</spigot .version>
58- <paper .version>1.21.7 -R0.1-SNAPSHOT</paper .version>
58+ <paper .version>1.21.8 -R0.1-SNAPSHOT</paper .version>
5959 <bentobox .version>3.3.0</bentobox .version> <!-- Errors with later versions regarding kyori-->
6060 <!-- Revision variable removes warning about dynamic version -->
6161 <revision >${build.version}-SNAPSHOT</revision >
6262 <!-- Do not change unless you want different name for local builds. -->
6363 <build .number>-LOCAL</build .number>
6464 <!-- This allows to change between versions. -->
65- <build .version>3.0.1 </build .version>
65+ <build .version>3.2.0 </build .version>
6666
6767 <sonar .projectKey>BentoBoxWorld_Boxed</sonar .projectKey>
6868 <sonar .organization>bentobox-world</sonar .organization>
183183 <version >${spigot.version} </version >
184184 <scope >provided</scope >
185185 </dependency >
186+ <dependency >
187+ <groupId >org.spigotmc......</groupId >
188+ <artifactId >spigot</artifactId >
189+ <version >1.21.7-R0.1-SNAPSHOT</version >
190+ <scope >provided</scope >
191+ </dependency >
186192 <dependency >
187193 <groupId >org.spigotmc.....</groupId >
188194 <artifactId >spigot</artifactId >
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ public class Settings implements WorldSettings {
8686 @ ConfigComment ("Other plugins may override this setting" )
8787 @ ConfigEntry (path = "world.difficulty" )
8888 private Difficulty difficulty = Difficulty .NORMAL ;
89+
90+ @ ConfigComment ("Allow structures to generate in the seed world" )
91+ @ ConfigEntry (path = "world.allow-structures" )
92+ private boolean allowStructures ;
8993
9094 @ ConfigComment ("Spawn limits. These override the limits set in bukkit.yml" )
9195 @ ConfigComment ("If set to a negative number, the server defaults will be used" )
@@ -1801,4 +1805,15 @@ public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) {
18011805 this .disallowTeamMemberIslands = disallowTeamMemberIslands ;
18021806 }
18031807
1808+ public boolean isAllowStructures () {
1809+ return allowStructures ;
1810+ }
1811+
1812+ /**
1813+ * @param allowStructures the allowStructures to set
1814+ */
1815+ public void setAllowStructures (boolean allowStructures ) {
1816+ this .allowStructures = allowStructures ;
1817+ }
1818+
18041819}
Original file line number Diff line number Diff line change @@ -136,8 +136,7 @@ public boolean shouldGenerateMobs() {
136136
137137 @ Override
138138 public boolean shouldGenerateStructures () {
139- return false ;
140- //return this.addon.getSettings().isAllowStructures();
139+ return this .addon .getSettings ().isAllowStructures ();
141140 }
142141
143142}
Original file line number Diff line number Diff line change 1+ package world .bentobox .boxed .nms .v1_21_8_R0_1_SNAPSHOT ;
2+
3+ import org .bukkit .Location ;
4+ import org .bukkit .block .Block ;
5+ import org .bukkit .craftbukkit .v1_21_R5 .CraftWorld ;
6+
7+ import net .minecraft .core .BlockPosition ;
8+ import net .minecraft .world .level .block .entity .TileEntity ;
9+ import world .bentobox .boxed .nms .AbstractMetaData ;
10+
11+ public class GetMetaData extends AbstractMetaData {
12+
13+ @ Override
14+ public String nmsData (Block block ) {
15+ Location w = block .getLocation ();
16+ CraftWorld cw = (CraftWorld ) w .getWorld (); // CraftWorld is NMS one
17+ // for 1.13+ (we have use WorldServer)
18+ TileEntity te = cw .getHandle ().c_ (new BlockPosition (w .getBlockX (), w .getBlockY (), w .getBlockZ ()));
19+ return getData (te , "getUpdatePacket" , "tag" );
20+ }
21+
22+ }
Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ boxed:
898898 saved : ' &a Placed and saved to structures.yml'
899899 failed : ' &c Could not be saved to structures.yml. Check console for error'
900900 unknown : ' &c Unknown parameter: [label]'
901- undo-success : ' &a Undone. Some changes cannot be undone.''
901+ undo-success : ' &a Undone. Some changes cannot be undone.'
902902 island :
903903 go :
904904 parameters : ' [home number]'
You can’t perform that action at this time.
0 commit comments