mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 21:27:44 +01:00
Fix null check for pos1 and pos2
This commit is contained in:
parent
7ea0edea91
commit
259cb19cf3
@ -314,11 +314,13 @@ public class BlueprintClipboard {
|
|||||||
*/
|
*/
|
||||||
public void setPos1(@Nullable Location pos1) {
|
public void setPos1(@Nullable Location pos1) {
|
||||||
origin = null;
|
origin = null;
|
||||||
if (pos1.getBlockY() < 0) {
|
if (pos1 != null) {
|
||||||
pos1.setY(0);
|
if (pos1.getBlockY() < 0) {
|
||||||
}
|
pos1.setY(0);
|
||||||
if (pos1.getBlockY() > 255) {
|
}
|
||||||
pos1.setY(255);
|
if (pos1.getBlockY() > 255) {
|
||||||
|
pos1.setY(255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.pos1 = pos1;
|
this.pos1 = pos1;
|
||||||
}
|
}
|
||||||
@ -328,11 +330,13 @@ public class BlueprintClipboard {
|
|||||||
*/
|
*/
|
||||||
public void setPos2(@Nullable Location pos2) {
|
public void setPos2(@Nullable Location pos2) {
|
||||||
origin = null;
|
origin = null;
|
||||||
if (pos2.getBlockY() < 0) {
|
if (pos2 != null) {
|
||||||
pos2.setY(0);
|
if (pos2.getBlockY() < 0) {
|
||||||
}
|
pos2.setY(0);
|
||||||
if (pos2.getBlockY() > 255) {
|
}
|
||||||
pos2.setY(255);
|
if (pos2.getBlockY() > 255) {
|
||||||
|
pos2.setY(255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.pos2 = pos2;
|
this.pos2 = pos2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user