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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.27.0</build.version>
<build.version>1.27.1</build.version>
<sonar.projectKey>BentoBoxWorld_Limits</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/world/bentobox/limits/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ enum GeneralGroup {
private final Map<EntityType, Integer> limits = new EnumMap<>(EntityType.class);
private final Map<EntityType, List<EntityGroup>> groupLimits = new EnumMap<>(EntityType.class);
private final List<String> gameModes;
private final boolean logLimitsOnJoin;
private final boolean asyncGolums;
private static final List<EntityType> DISALLOWED = Arrays.asList(
EntityType.TNT,
Expand Down Expand Up @@ -79,6 +80,8 @@ public Settings(Limits addon) {
}
}
}
// Log limits on join
logLimitsOnJoin = addon.getConfig().getBoolean("log-limits-on-join", true);
// Async Golums
asyncGolums = addon.getConfig().getBoolean("async-golums", true);

Expand Down Expand Up @@ -158,6 +161,13 @@ public List<String> getGameModes() {
return gameModes;
}

/**
* @return the logLimitsOnJoin
*/
public boolean isLogLimitsOnJoin() {
return logLimitsOnJoin;
}

/**
* @return the asyncGolums
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ private void handleBreak(Event e, Block b) {
return;
}
Material mat = b.getType();

// Check for stackable plants
if (STACKABLE.contains(b.getType())) {
// Check for blocks above
Expand Down Expand Up @@ -309,8 +310,9 @@ public void onBlock(BlockFromToEvent e) {
*/
public Material fixMaterial(BlockData b) {
Material mat = b.getMaterial();

if (mat == Material.REDSTONE_WALL_TORCH) {
if (mat.equals(Material.CHIPPED_ANVIL) || mat.equals(Material.DAMAGED_ANVIL)) {
return Material.ANVIL;
} else if (mat == Material.REDSTONE_WALL_TORCH) {
return Material.REDSTONE_TORCH;
} else if (mat == Material.WALL_TORCH) {
return Material.TORCH;
Expand Down
Loading