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,12 +314,14 @@ public class BlueprintClipboard {
|
||||
*/
|
||||
public void setPos1(@Nullable Location pos1) {
|
||||
origin = null;
|
||||
if (pos1 != null) {
|
||||
if (pos1.getBlockY() < 0) {
|
||||
pos1.setY(0);
|
||||
}
|
||||
if (pos1.getBlockY() > 255) {
|
||||
pos1.setY(255);
|
||||
}
|
||||
}
|
||||
this.pos1 = pos1;
|
||||
}
|
||||
|
||||
@ -328,12 +330,14 @@ public class BlueprintClipboard {
|
||||
*/
|
||||
public void setPos2(@Nullable Location pos2) {
|
||||
origin = null;
|
||||
if (pos2 != null) {
|
||||
if (pos2.getBlockY() < 0) {
|
||||
pos2.setY(0);
|
||||
}
|
||||
if (pos2.getBlockY() > 255) {
|
||||
pos2.setY(255);
|
||||
}
|
||||
}
|
||||
this.pos2 = pos2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user