forked from Upstream/CommandPanels
Fix for %cp-material-slot% and legacy ids.
This commit is contained in:
parent
6138ef1e2d
commit
10dc42ac3c
@ -191,7 +191,7 @@ public class Placeholders {
|
|||||||
material = p.getOpenInventory().getTopInventory().getItem((int)Double.parseDouble(matNumber)).getType().toString();
|
material = p.getOpenInventory().getTopInventory().getItem((int)Double.parseDouble(matNumber)).getType().toString();
|
||||||
if (plugin.legacy.LOCAL_VERSION.lessThanOrEqualTo(MinecraftVersions.v1_12)) {
|
if (plugin.legacy.LOCAL_VERSION.lessThanOrEqualTo(MinecraftVersions.v1_12)) {
|
||||||
//add the ID to the end if it is legacy (eg, material:id)
|
//add the ID to the end if it is legacy (eg, material:id)
|
||||||
material = material + ":" + p.getOpenInventory().getTopInventory().getItem((int)Double.parseDouble(matNumber)).getType().getId();
|
material = material + ":" + p.getOpenInventory().getTopInventory().getItem((int)Double.parseDouble(matNumber)).getData().getData();
|
||||||
}
|
}
|
||||||
} catch (NullPointerException er) {
|
} catch (NullPointerException er) {
|
||||||
material = "AIR";
|
material = "AIR";
|
||||||
|
Loading…
Reference in New Issue
Block a user