mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Lets ignore materials which don't exist in older versions
This commit is contained in:
parent
33bcbd6d62
commit
526bc78fd7
@ -447,7 +447,7 @@ public class ConfigManager {
|
|||||||
if (Version.isCurrentLower(Version.v1_13_R1) && meta.isEmpty())
|
if (Version.isCurrentLower(Version.v1_13_R1) && meta.isEmpty())
|
||||||
meta = String.valueOf(material.getData());
|
meta = String.valueOf(material.getData());
|
||||||
|
|
||||||
c: if (material != CMIMaterial.NONE && material.getMaterial() != null) {
|
c: if (material != CMIMaterial.NONE && material.getMaterial() != null && !material.isAir()) {
|
||||||
// Need to include those ones and count as regular blocks
|
// Need to include those ones and count as regular blocks
|
||||||
switch (myKey.replace("_", "").toLowerCase()) {
|
switch (myKey.replace("_", "").toLowerCase()) {
|
||||||
case "itemframe":
|
case "itemframe":
|
||||||
@ -471,7 +471,7 @@ public class ConfigManager {
|
|||||||
|
|
||||||
// Break and Place actions MUST be blocks
|
// Break and Place actions MUST be blocks
|
||||||
if (actionType == ActionType.BREAK || actionType == ActionType.PLACE || actionType == ActionType.STRIPLOGS) {
|
if (actionType == ActionType.BREAK || actionType == ActionType.PLACE || actionType == ActionType.STRIPLOGS) {
|
||||||
if (!material.isBlock()) {
|
if (!material.isBlock() || material.getMaterial().toString().equalsIgnoreCase("AIR")) {
|
||||||
Jobs.getPluginLogger().warning("Job " + jobName + " has an invalid " + actionType.getName() + " type property: " + material
|
Jobs.getPluginLogger().warning("Job " + jobName + " has an invalid " + actionType.getName() + " type property: " + material
|
||||||
+ " (" + myKey + ")! Material must be a block! Use \"/jobs blockinfo\" on a target block");
|
+ " (" + myKey + ")! Material must be a block! Use \"/jobs blockinfo\" on a target block");
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user