Skip to content

Commit

Permalink
change: exclude Build-Tool from being backed up
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jul 31, 2024
1 parent dbefe03 commit 8bbb727
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "net.azisaba"
version = "1.15.2+6.16.7"
version = "1.15.2+6.16.8-SNAPSHOT"

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ public static ItemStack backupTag(@Nullable ItemStack stack) {
if (stack == null || stack.getType().isAir()) return null;
NBTTagCompound tag = CraftItemStack.asNMSCopy(stack).getTag();
if (tag == null || tag.isEmpty()) return stack;
if (!tag.getCompound("backup").isEmpty()) return stack;
// exclude some items
if (tag.getCompound("PublicBukkitValues").getInt("minecraft:admin_item") == 1) {
return stack;
}
return setTag(stack, "backup", tag);
}

Expand Down

0 comments on commit 8bbb727

Please sign in to comment.