File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
src/main/java/world/bentobox/level Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 55
55
<powermock .version>2.0.9</powermock .version>
56
56
<!-- More visible way how to change dependency versions -->
57
57
<spigot .version>1.21.5-R0.1-SNAPSHOT</spigot .version>
58
- <bentobox .version>3.3.1 </bentobox .version>
58
+ <bentobox .version>3.4.0 </bentobox .version>
59
59
<!-- Warps addon version -->
60
60
<warps .version>1.12.0</warps .version>
61
61
<!-- Visit addon version -->
67
67
<!-- Do not change unless you want different name for local builds. -->
68
68
<build .number>-LOCAL</build .number>
69
69
<!-- This allows to change between versions. -->
70
- <build .version>2.21.1 </build .version>
70
+ <build .version>2.21.2 </build .version>
71
71
<sonar .projectKey>BentoBoxWorld_Level</sonar .projectKey>
72
72
<sonar .organization>bentobox-world</sonar .organization>
73
73
<sonar .host.url>https://sonarcloud.io</sonar .host.url>
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ private List<String> getReport() {
272
272
while (it .hasNext ()) {
273
273
274
274
Entry <Object > type = it .next ();
275
- Integer limit = addon .getBlockConfig ().getLimit (type );
275
+ Integer limit = addon .getBlockConfig ().getLimit (type . getElement () );
276
276
String explain = ")" ;
277
277
reportLines .add (Util .prettifyText (type .toString ()) + ": " + String .format ("%,d" , type .getCount ())
278
278
+ " blocks (max " + limit + explain );
@@ -374,7 +374,10 @@ private int limitCountAndValue(Object obj) {
374
374
}
375
375
376
376
int count = limitCount .getOrDefault (obj , 0 );
377
+
377
378
if (count > limit ) {
379
+ // Add block to ofCount
380
+ this .results .ofCount .add (obj );
378
381
return 0 ;
379
382
}
380
383
limitCount .put (obj , count + 1 );
Original file line number Diff line number Diff line change 19
19
import org .bukkit .configuration .file .YamlConfiguration ;
20
20
import org .bukkit .entity .EntityType ;
21
21
22
+ import world .bentobox .bentobox .BentoBox ;
22
23
import world .bentobox .bentobox .hooks .ItemsAdderHook ;
23
24
import world .bentobox .level .Level ;
24
25
@@ -177,14 +178,15 @@ private void loadWorlds(YamlConfiguration blockValues2) {
177
178
*/
178
179
public Integer getLimit (Object obj ) {
179
180
if (obj instanceof Material m ) {
180
- return blockLimits .get (m .name ());
181
+ return blockLimits .get (m .getKey (). getKey ());
181
182
}
182
183
if (obj instanceof EntityType et ) {
183
- return blockLimits .get (et .name ().concat (SPAWNER ));
184
+ return blockLimits .get (et .name ().toLowerCase ( Locale . ENGLISH ). concat (SPAWNER ));
184
185
}
185
186
if (obj instanceof String s ) {
186
187
return blockLimits .get (s );
187
188
}
189
+
188
190
return null ;
189
191
}
190
192
You can’t perform that action at this time.
0 commit comments