mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-23 06:51:19 +01:00
Better compatibility support.
This commit is contained in:
parent
f33b26c26e
commit
cca02a4777
@ -1464,9 +1464,10 @@ public enum CompatibleMaterial {
|
||||
if (legacyBlock != null) {
|
||||
return lookupMap.get(legacyBlock.name());
|
||||
}
|
||||
CompatibleMaterial withData = lookupMap.get(mat.name() + ":" + block.getData());
|
||||
return withData == null ? lookupMap.get(mat.name()) : withData;
|
||||
}
|
||||
CompatibleMaterial withData = lookupMap.get(mat.name() + ":" + block.getData());
|
||||
return withData == null ? lookupMap.get(mat.name()) : withData;
|
||||
return lookupMap.get(mat.name());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.songoda.core.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.configuration.Config;
|
||||
import com.songoda.core.configuration.ConfigSection;
|
||||
import com.songoda.core.gui.methods.Clickable;
|
||||
@ -624,7 +625,8 @@ public class CustomizableGui extends Gui {
|
||||
public boolean applyItem(ItemStack item) {
|
||||
if (item == null) return false;
|
||||
item.setType(this.item.getMaterial());
|
||||
item.setDurability(this.item.getData());
|
||||
if (ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_13))
|
||||
item.setDurability(this.item.getData());
|
||||
applyMeta(item);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user