Fix Region with null testblock #162
@ -47,6 +47,10 @@ public class CommandTestblock implements CommandExecutor {
|
|||||||
|
|
||||||
for(Region region : Region.getRegions()){
|
for(Region region : Region.getRegions()){
|
||||||
if(region.inRegion(player.getLocation())){
|
if(region.inRegion(player.getLocation())){
|
||||||
|
if (!region.hasTestblock()) {
|
||||||
|
|||||||
|
player.sendMessage(BauSystem.PREFIX + "§cRegion ohne Testblock");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Schematic schem = null;
|
Schematic schem = null;
|
||||||
if(args.length > 0){
|
if(args.length > 0){
|
||||||
|
@ -88,6 +88,10 @@ public class Region {
|
|||||||
prototype.reset(this, schem);
|
prototype.reset(this, schem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasTestblock() {
|
||||||
|
return prototype.hasTestblock();
|
||||||
|
}
|
||||||
|
|
||||||
public void resetTestblock(Schematic schem) throws IOException, NoClipboardException{
|
public void resetTestblock(Schematic schem) throws IOException, NoClipboardException{
|
||||||
prototype.resetTestblock(this, schem);
|
prototype.resetTestblock(this, schem);
|
||||||
}
|
}
|
||||||
@ -167,7 +171,7 @@ public class Region {
|
|||||||
paste(schem.load(), x, y, z, rotate);
|
paste(schem.load(), x, y, z, rotate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasProtection(){
|
public boolean hasProtection() {
|
||||||
return protectSchematic != null;
|
return protectSchematic != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,6 +185,10 @@ public class Region {
|
|||||||
paste(schem.load(), x, y, z, rotate);
|
paste(schem.load(), x, y, z, rotate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasTestblock() {
|
||||||
|
return testblock != null;
|
||||||
|
}
|
||||||
|
|
||||||
public void resetTestblock(Region region, Schematic schem) throws IOException, NoClipboardException {
|
public void resetTestblock(Region region, Schematic schem) throws IOException, NoClipboardException {
|
||||||
testblock.reset(region, schem);
|
testblock.reset(region, schem);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Ok sollte so nun behoben sein.