mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-23 15:51:39 +01:00
Fixes NPE when pasting and the blueprint has no original set.
This commit is contained in:
parent
3cb9a0e4df
commit
a55459a70c
@ -80,7 +80,8 @@ public class BlueprintPaster {
|
||||
this.plugin = plugin;
|
||||
this.clipboard = clipboard;
|
||||
// Calculate location for pasting
|
||||
Location loc = location.toVector().subtract(clipboard.getOrigin().toVector()).toLocation(location.getWorld());
|
||||
Vector offset = clipboard.getOrigin() != null ? clipboard.getOrigin().toVector() : new Vector(0, 0, 0);
|
||||
Location loc = location.toVector().subtract(offset).toLocation(location.getWorld());
|
||||
paste(location.getWorld(), null, loc, clipboard.getBlueprint(), task);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user