Merge pull request 'Fix CommandTNT for Region without Testblock' (#177) from FixWSGS into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
c9d33d22b4
@ -139,7 +139,7 @@ public class CommandTNT implements CommandExecutor, Listener {
|
||||
}
|
||||
|
||||
private void tntToggle(Region region, TNTMode requestedMode, String requestedMessage) {
|
||||
if (requestedMode != null) {
|
||||
if (requestedMode != null && region.hasTestblock()) {
|
||||
region.setTntMode(requestedMode);
|
||||
RegionToggleCommand.actionBar(region, requestedMessage);
|
||||
return;
|
||||
@ -151,7 +151,7 @@ public class CommandTNT implements CommandExecutor, Listener {
|
||||
RegionToggleCommand.actionBar(region, getDisableMessage());
|
||||
break;
|
||||
case OFF:
|
||||
if (Region.buildAreaEnabled()) {
|
||||
if (Region.buildAreaEnabled() && region.hasTestblock()) {
|
||||
region.setTntMode(TNTMode.ONLY_TB);
|
||||
RegionToggleCommand.actionBar(region, getTestblockEnableMessage());
|
||||
} else {
|
||||
|
@ -110,6 +110,7 @@ public class Region {
|
||||
minZ = config.getInt("minZ");
|
||||
prototype = Prototype.prototypes.get(config.getString("prototype"));
|
||||
optionsLinkedWith = config.getString("optionsLinkedWith", null);
|
||||
if (!hasTestblock()) tntMode = TNTMode.OFF;
|
||||
regions.add(this);
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren