mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-15 03:50:14 +08:00
Fix console error during /give command
There has been a method for this since 1.13. Why have we been using this for so long? Since item NBT is now dead, this method for checking if an item is spawn-able is defunct and produces a console error every time the give command is ran.
This commit is contained in:
parent
5392169f72
commit
aec5859c2a
@ -129,6 +129,7 @@ public class MetaItemStack {
|
||||
}
|
||||
|
||||
public boolean canSpawn(final IEssentials ess) {
|
||||
if (VersionUtil.PRE_FLATTENING) {
|
||||
try {
|
||||
ess.getServer().getUnsafe().modifyItemStack(stack.clone(), "{}");
|
||||
return true;
|
||||
@ -141,6 +142,8 @@ public class MetaItemStack {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return stack.getType().isItem();
|
||||
}
|
||||
|
||||
public void parseStringMeta(final CommandSource sender, final boolean allowUnsafe, final String[] string, final int fromArg, final IEssentials ess) throws Exception {
|
||||
if (string[fromArg].startsWith("{") && hasMetaPermission(sender, "vanilla", false, true, ess)) {
|
||||
|
Loading…
Reference in New Issue
Block a user