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 -> {
|
event.blockList().removeIf(block -> {
|
||||||
Region region = Region.getRegion(block.getLocation());
|
Region region = Region.getRegion(block.getLocation());
|
||||||
if (region.getTntMode() == TNTMode.ON) return false;
|
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");
|
RegionUtils.actionBar(region, "§cEine Explosion hätte Blöcke im Baubereich zerstört");
|
||||||
return true;
|
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");
|
RegionUtils.actionBar(region, "§cEine Explosion hätte Blöcke im Ausfahrbereich zerstört");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ public class Region {
|
|||||||
|
|
||||||
public Point getMinPoint(RegionType regionType, RegionExtensionType regionExtensionType) {
|
public Point getMinPoint(RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||||
switch (regionType) {
|
switch (regionType) {
|
||||||
case BUILD_AREA:
|
case BUILD:
|
||||||
return prototype.buildArea.getMinPoint(this, regionExtensionType);
|
return prototype.buildArea.getMinPoint(this, regionExtensionType);
|
||||||
case TESTBLOCK:
|
case TESTBLOCK:
|
||||||
return prototype.testblock.getMinPoint(this, regionExtensionType);
|
return prototype.testblock.getMinPoint(this, regionExtensionType);
|
||||||
@ -169,7 +169,7 @@ public class Region {
|
|||||||
|
|
||||||
public Point getMaxPoint(RegionType regionType, RegionExtensionType regionExtensionType) {
|
public Point getMaxPoint(RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||||
switch (regionType) {
|
switch (regionType) {
|
||||||
case BUILD_AREA:
|
case BUILD:
|
||||||
return prototype.buildArea.getMaxPoint(this, regionExtensionType);
|
return prototype.buildArea.getMaxPoint(this, regionExtensionType);
|
||||||
case TESTBLOCK:
|
case TESTBLOCK:
|
||||||
return prototype.testblock.getMaxPoint(this, regionExtensionType);
|
return prototype.testblock.getMaxPoint(this, regionExtensionType);
|
||||||
@ -181,7 +181,7 @@ public class Region {
|
|||||||
|
|
||||||
public boolean inRegion(Location l, RegionType regionType, RegionExtensionType regionExtensionType) {
|
public boolean inRegion(Location l, RegionType regionType, RegionExtensionType regionExtensionType) {
|
||||||
switch (regionType) {
|
switch (regionType) {
|
||||||
case BUILD_AREA:
|
case BUILD:
|
||||||
return prototype.buildArea.inRegion(this, l, regionExtensionType);
|
return prototype.buildArea.inRegion(this, l, regionExtensionType);
|
||||||
case TESTBLOCK:
|
case TESTBLOCK:
|
||||||
return prototype.testblock.inRegion(this, l, regionExtensionType);
|
return prototype.testblock.inRegion(this, l, regionExtensionType);
|
||||||
|
@ -21,6 +21,6 @@ package de.steamwar.bausystem.world.regions;
|
|||||||
|
|
||||||
public enum RegionType {
|
public enum RegionType {
|
||||||
NORMAL,
|
NORMAL,
|
||||||
BUILD_AREA,
|
BUILD,
|
||||||
TESTBLOCK
|
TESTBLOCK
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren