-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for Items tag, used in Bundles
- Loading branch information
Showing
5 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
api/src/main/java/com/ruinscraft/panilla/api/nbt/checks/NbtCheck_Items.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.ruinscraft.panilla.api.nbt.checks; | ||
|
||
import com.ruinscraft.panilla.api.IPanilla; | ||
import com.ruinscraft.panilla.api.config.PStrictness; | ||
import com.ruinscraft.panilla.api.exception.FailedNbt; | ||
import com.ruinscraft.panilla.api.nbt.INbtTagCompound; | ||
import com.ruinscraft.panilla.api.nbt.INbtTagList; | ||
|
||
// Similar to BlockEntityTag | ||
// Used mainly for Bundles (1.17) | ||
public class NbtCheck_Items extends NbtCheck { | ||
|
||
public NbtCheck_Items() { | ||
super("Items", PStrictness.LENIENT); | ||
} | ||
|
||
@Override | ||
public NbtCheck.NbtCheckResult check(INbtTagCompound tag, String itemName, IPanilla panilla) { | ||
INbtTagList itemsTagList = tag.getList(getName()); | ||
|
||
FailedNbt failedNbt = NbtCheck_BlockEntityTag.checkItems(getName(), itemsTagList, itemName, panilla); | ||
|
||
if (FailedNbt.fails(failedNbt)) { | ||
return failedNbt.result; | ||
} else { | ||
return NbtCheck.NbtCheckResult.PASS; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
allprojects { | ||
group = 'com.ruinscraft' | ||
version = '1.7.8' | ||
version = '1.7.9' | ||
} | ||
|
||
subprojects { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies { | ||
compileOnly project(':panilla-api') | ||
compileOnly 'org.spigotmc:spigot:1.19.1-R0.1-SNAPSHOT' | ||
compileOnly 'org.spigotmc:spigot:1.19.2-R0.1-SNAPSHOT' | ||
} |