Skip to content

Commit

Permalink
Fixing minor mistakes that caused errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerOfPie committed Nov 28, 2022
1 parent 60f29b2 commit 9c37352
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ private GuiElement numericalOption(ShopItemStackSettingKeys setting, ShopItemSta
return new StaticGuiElement('e', indexedTempItem[item.getShopSettingAsInteger(setting) + 1], setting.makeReadable(), item.getStateString(setting));
}

private GuiElement booleanOption(ShopItemStackSettingKeys setting, ShopItemStack item, boolean editable) {
if (setting.isUserEditable() && editable) {
private GuiElement booleanOption(ShopItemStackSettingKeys setting, ShopItemStack item, boolean isScreenEditable) {
if (setting.isUserEditable() && isScreenEditable) {
return new GuiStateElement('e',
String.valueOf(item.getShopSettingAsBoolean(setting)),
new GuiStateElement.State(change -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public JsonLinkageConfiguration(World world) {
public void load() {
linkageData = gson.fromJson(jsonObj.get("linkage_data"), new TypeToken<Map<String, String>>() {
}.getType());

if (linkageData == null)
linkageData = new HashMap<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonSyntaxException;
import com.google.gson.internal.bind.JsonTreeReader;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.shanerx.tradeshop.utils.gsonprocessing.typeadapters.ConfigurationSerializableAdapter;

Expand Down Expand Up @@ -58,7 +57,7 @@ public <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException
}

public <T> T fromJson(JsonElement json, Type typeOfT) throws JsonSyntaxException {
return globalGson.fromJson(new JsonTreeReader(json), typeOfT);
return globalGson.fromJson(json, typeOfT);
}

public String toJson(Object src) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/builddate.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
buildtime: ${timestamp}
buildtime: ${timeStamp}

0 comments on commit 9c37352

Please sign in to comment.