Fix RegionType.BUILD
Dieser Commit ist enthalten in:
Ursprung
e90dda786b
Commit
d5f194656b
@ -159,11 +159,11 @@ public class CommandTNT extends SWCommand implements Listener {
|
||||
event.blockList().removeIf(block -> {
|
||||
Region region = Region.getRegion(block.getLocation());
|
||||
if (region.getTntMode() == TNTMode.ON) return false;
|
||||
if (region.hasBuildRegion() && region.inRegion(block.getLocation(), RegionType.BUILD_AREA, RegionExtensionType.NORMAL)) {
|
||||
if (region.hasBuildRegion() && region.inRegion(block.getLocation(), RegionType.BUILD, RegionExtensionType.NORMAL)) {
|
||||
RegionUtils.actionBar(region, "§cEine Explosion hätte Blöcke im Baubereich zerstört");
|
||||
return true;
|
||||
}
|
||||
if (region.hasBuildRegion() && region.inRegion(block.getLocation(), RegionType.BUILD_AREA, RegionExtensionType.EXTENSION)) {
|
||||
if (region.hasBuildRegion() && region.inRegion(block.getLocation(), RegionType.BUILD, RegionExtensionType.EXTENSION)) {
|
||||
RegionUtils.actionBar(region, "§cEine Explosion hätte Blöcke im Ausfahrbereich zerstört");
|
||||
return true;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public class Region {
|
||||
|
||||
public Point getMinPoint(RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||
switch (regionType) {
|
||||
case BUILD_AREA:
|
||||
case BUILD:
|
||||
return prototype.buildArea.getMinPoint(this, regionExtensionType);
|
||||
case TESTBLOCK:
|
||||
return prototype.testblock.getMinPoint(this, regionExtensionType);
|
||||
@ -169,7 +169,7 @@ public class Region {
|
||||
|
||||
public Point getMaxPoint(RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||
switch (regionType) {
|
||||
case BUILD_AREA:
|
||||
case BUILD:
|
||||
return prototype.buildArea.getMaxPoint(this, regionExtensionType);
|
||||
case TESTBLOCK:
|
||||
return prototype.testblock.getMaxPoint(this, regionExtensionType);
|
||||
@ -181,7 +181,7 @@ public class Region {
|
||||
|
||||
public boolean inRegion(Location l, RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||
switch (regionType) {
|
||||
case BUILD_AREA:
|
||||
case BUILD:
|
||||
return prototype.buildArea.inRegion(this, l, regionExtensionType);
|
||||
case TESTBLOCK:
|
||||
return prototype.testblock.inRegion(this, l, regionExtensionType);
|
||||
|
@ -21,6 +21,6 @@ package de.steamwar.bausystem.world.regions;
|
||||
|
||||
public enum RegionType {
|
||||
NORMAL,
|
||||
BUILD_AREA,
|
||||
BUILD,
|
||||
TESTBLOCK
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren