Skip to content

Commit

Permalink
Test: apply sync
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachesMLG committed Jun 10, 2024
1 parent 3b5b6ee commit 2931051
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "com.iridium"
version = "1.9.9"
version = "1.9.9-b1"
description = "IridiumCore"

allprojects {
Expand Down
4 changes: 4 additions & 0 deletions plugin/src/main/java/com/iridium/iridiumcore/IridiumCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ public void loadConfigs() {
public void saveConfigs() {
}

public boolean setItemStackSync() {
return true;
}

public static IridiumCore getInstance() {
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public static ItemStack makeItem(Item item, List<Placeholder> placeholders) {
ItemStack itemStack = makeItem(item.material, item.amount, StringUtils.processMultiplePlaceholders(item.displayName, placeholders), StringUtils.processMultiplePlaceholders(item.lore, placeholders));

if (item.material == XMaterial.PLAYER_HEAD && item.skullData != null && !item.skullData.isEmpty() && !IridiumCore.isTesting()) {
XSkull.of(itemStack).profile(StringUtils.processMultiplePlaceholders(item.skullData, placeholders)).applyAsync();
if (IridiumCore.getInstance().setItemStackSync()) {
XSkull.of(itemStack).profile(StringUtils.processMultiplePlaceholders(item.skullData, placeholders)).apply();
} else {
XSkull.of(itemStack).profile(StringUtils.processMultiplePlaceholders(item.skullData, placeholders)).applyAsync();

}
}

return itemStack;
Expand Down

0 comments on commit 2931051

Please sign in to comment.