Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #543

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected static void logTransaction(PreparedStatement preparedStmt, int batchCo
if (item != null) {
if (item.getAmount() > 0 && !Util.isAir(item.getType())) {
// Object[] metadata = new Object[] { slot, item.getItemMeta() };
List<List<Map<String, Object>>> metadata = ItemMetaHandler.seralize(item, type, faceData, slot);
List<List<Map<String, Object>>> metadata = ItemMetaHandler.serialize(item, type, faceData, slot);
if (metadata.size() == 0) {
metadata = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected static void logTransaction(PreparedStatement preparedStmt, int batchCo
for (ItemStack item : items) {
if (item != null && item.getAmount() > 0 && !Util.isAir(item.getType())) {
// Object[] metadata = new Object[] { slot, item.getItemMeta() };
List<List<Map<String, Object>>> data = ItemMetaHandler.seralize(item, null, null, 0);
List<List<Map<String, Object>>> data = ItemMetaHandler.serialize(item, null, null, 0);
if (data.size() == 0) {
data = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ else if (entity instanceof AbstractVillager) {
List<Object> ingredients = new ArrayList<>();
List<Object> itemMap = new ArrayList<>();
ItemStack item = merchantRecipe.getResult().clone();
List<List<Map<String, Object>>> metadata = ItemMetaHandler.seralize(item, item.getType(), null, 0);
List<List<Map<String, Object>>> metadata = ItemMetaHandler.serialize(item, item.getType(), null, 0);
item.setItemMeta(null);
itemMap.add(item.serialize());
itemMap.add(metadata);
Expand All @@ -389,7 +389,7 @@ else if (entity instanceof AbstractVillager) {
for (ItemStack ingredient : merchantRecipe.getIngredients()) {
itemMap = new ArrayList<>();
item = ingredient.clone();
metadata = ItemMetaHandler.seralize(item, item.getType(), null, 0);
metadata = ItemMetaHandler.serialize(item, item.getType(), null, 0);
item.setItemMeta(null);
itemMap.add(item.serialize());
itemMap.add(metadata);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/coreprotect/utility/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ public static Map<String, Object> serializeItemStack(ItemStack itemStack, String
Map<String, Object> itemMap = new HashMap<>();
if (itemStack != null && !itemStack.getType().equals(Material.AIR)) {
ItemStack item = itemStack.clone();
List<List<Map<String, Object>>> metadata = ItemMetaHandler.seralize(item, null, faceData, slot);
List<List<Map<String, Object>>> metadata = ItemMetaHandler.serialize(item, null, faceData, slot);
item.setItemMeta(null);
itemMap.put("0", item.serialize());
itemMap.put("1", metadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static List<String> getEnchantments(ItemStack item, String displayName) {
return result;
}

public static List<List<Map<String, Object>>> seralize(ItemStack item, Material type, String faceData, int slot) {
public static List<List<Map<String, Object>>> serialize(ItemStack item, Material type, String faceData, int slot) {
List<List<Map<String, Object>>> metadata = new ArrayList<>();
List<Map<String, Object>> list = new ArrayList<>();
List<Object> modifiers = new ArrayList<>();
Expand Down
Loading