mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Fix NPE
Former-commit-id: 51eee00104da232650048c4e853f26852d1a1db8 [formerly a8ca85d088969b01131000387673d080d657dea9] Former-commit-id: 6322b99037894d5e5969615d64401d0a9be25e08
This commit is contained in:
1 parent
d52d288193
commit
534b6adeb0
1 file changed
+6
-7
@@ -15,23 +15,22 @@ public class Info {
|
||||
private Block last;
|
||||
private Shop shop;
|
||||
|
||||
public Info(@NotNull Location loc, @NotNull ShopAction action, @NotNull ItemStack item, @NotNull Block last) {
|
||||
public Info(@NotNull Location loc, @NotNull ShopAction action, @Nullable ItemStack item, @NotNull Block last) {
|
||||
this.loc = loc;
|
||||
this.action = action;
|
||||
this.last = last;
|
||||
// if (item != null)
|
||||
this.item = item.clone();
|
||||
if (item != null)
|
||||
this.item = item.clone();
|
||||
}
|
||||
|
||||
public Info(@NotNull Location loc, @NotNull ShopAction action, @NotNull ItemStack item, @NotNull Block last, @NotNull Shop shop) {
|
||||
public Info(@NotNull Location loc, @NotNull ShopAction action, @Nullable ItemStack item, @NotNull Block last, @Nullable Shop shop) {
|
||||
this.loc = loc;
|
||||
this.action = action;
|
||||
this.last = last;
|
||||
// if (item != null)
|
||||
if (item != null)
|
||||
this.item = item.clone();
|
||||
// if (shop != null) {
|
||||
if (shop != null)
|
||||
this.shop = shop.clone();
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user