Skip to content

Commit dac1f0c

Browse files
committed
Fixed NPE using /heads after autograbber or /addhead is used
1 parent b958d68 commit dac1f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/github/thatsmusic99/headsplus/config/ConfigHeadsSelector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public void postSave() {
9292
if (section.contains("price")) {
9393
headInfo.withPrice(section.getDouble("price", -1.0));
9494
}
95-
buyableHeads.put(key, headInfo);
9695
sectionInfo.addHead(key, headInfo);
9796
totalHeads++;
9897
}
@@ -148,6 +147,7 @@ public SectionInfo withDisplayName(String displayName) {
148147

149148
public void addHead(String id, BuyableHeadInfo head) {
150149
heads.put(id, head);
150+
instance.getBuyableHeads().put(id, head);
151151
}
152152

153153
public String getPermission() {

0 commit comments

Comments
 (0)