diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java b/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java index a33a68ec..375eeca8 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java @@ -450,7 +450,6 @@ public class editjobs implements Cmd { } - c: if (material != null) { // Need to include thos ones and count as regular blocks @@ -479,11 +478,15 @@ public class editjobs implements Cmd { break; } } - if (material == CMIMaterial.REDSTONE_ORE && actionT == ActionType.BREAK) { + if (material == CMIMaterial.REDSTONE_ORE && actionT == ActionType.BREAK && Version.isCurrentLower(Version.v1_13_R1)) { player.sendMessage(ChatColor.GOLD + "Job " + job.getName() + " is using REDSTONE_ORE instead of GLOWING_REDSTONE_ORE."); player.sendMessage(ChatColor.GOLD + "Automatically changing block to GLOWING_REDSTONE_ORE. Please update your configuration."); player.sendMessage(ChatColor.GOLD + "In vanilla minecraft, REDSTONE_ORE changes to GLOWING_REDSTONE_ORE when interacted with."); player.sendMessage(ChatColor.GOLD + "In the future, Jobs using REDSTONE_ORE instead of GLOWING_REDSTONE_ORE may fail to work correctly."); + material = CMIMaterial.LEGACY_GLOWING_REDSTON_ORE; + } else if (material == CMIMaterial.LEGACY_GLOWING_REDSTON_ORE && actionT == ActionType.BREAK && Version.isCurrentEqualOrHigher(Version.v1_13_R1)) { + player.sendMessage(ChatColor.GOLD + "Job " + job.getName() + " is using GLOWING_REDSTONE_ORE instead of REDSTONE_ORE."); + player.sendMessage(ChatColor.GOLD + "Automatically changing block to REDSTONE_ORE. Please update your configuration."); material = CMIMaterial.REDSTONE_ORE; } diff --git a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java index c0ab051f..d87c3595 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java @@ -273,11 +273,15 @@ public class ConfigManager { * future this hack may be removed and anybody using REDSTONE_ORE will have their * configurations broken. */ - if (material == CMIMaterial.REDSTONE_ORE && actionType == ActionType.BREAK) { + if (material == CMIMaterial.REDSTONE_ORE && actionType == ActionType.BREAK && Version.isCurrentLower(Version.v1_13_R1)) { Jobs.getPluginLogger().warning("Job " + jobName + " is using REDSTONE_ORE instead of GLOWING_REDSTONE_ORE."); Jobs.getPluginLogger().warning("Automatically changing block to GLOWING_REDSTONE_ORE. Please update your configuration."); Jobs.getPluginLogger().warning("In vanilla minecraft, REDSTONE_ORE changes to GLOWING_REDSTONE_ORE when interacted with."); Jobs.getPluginLogger().warning("In the future, Jobs using REDSTONE_ORE instead of GLOWING_REDSTONE_ORE may fail to work correctly."); + material = CMIMaterial.LEGACY_GLOWING_REDSTON_ORE; + } else if (material == CMIMaterial.LEGACY_GLOWING_REDSTON_ORE && actionType == ActionType.BREAK && Version.isCurrentEqualOrHigher(Version.v1_13_R1)) { + Jobs.getPluginLogger().warning("Job " + jobName + " is using GLOWING_REDSTONE_ORE instead of REDSTONE_ORE."); + Jobs.getPluginLogger().warning("Automatically changing block to REDSTONE_ORE. Please update your configuration."); material = CMIMaterial.REDSTONE_ORE; } // END HACK @@ -1032,11 +1036,15 @@ public class ConfigManager { * future this hack may be removed and anybody using REDSTONE_ORE will have their * configurations broken. */ - if (material == CMIMaterial.REDSTONE_ORE && actionType == ActionType.BREAK) { + if (material == CMIMaterial.REDSTONE_ORE && actionType == ActionType.BREAK && Version.isCurrentLower(Version.v1_13_R1)) { Jobs.getPluginLogger().warning("Job " + jobKey + " is using REDSTONE_ORE instead of GLOWING_REDSTONE_ORE."); Jobs.getPluginLogger().warning("Automatically changing block to GLOWING_REDSTONE_ORE. Please update your configuration."); Jobs.getPluginLogger().warning("In vanilla minecraft, REDSTONE_ORE changes to GLOWING_REDSTONE_ORE when interacted with."); Jobs.getPluginLogger().warning("In the future, Jobs using REDSTONE_ORE instead of GLOWING_REDSTONE_ORE may fail to work correctly."); + material = CMIMaterial.LEGACY_GLOWING_REDSTON_ORE; + } else if (material == CMIMaterial.LEGACY_GLOWING_REDSTON_ORE && actionType == ActionType.BREAK && Version.isCurrentEqualOrHigher(Version.v1_13_R1)) { + Jobs.getPluginLogger().warning("Job " + job.getName() + " is using GLOWING_REDSTONE_ORE instead of REDSTONE_ORE."); + Jobs.getPluginLogger().warning("Automatically changing block to REDSTONE_ORE. Please update your configuration."); material = CMIMaterial.REDSTONE_ORE; } // END HACK diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index e65911cf..2c3a3f01 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -375,7 +375,7 @@ public class JobsPaymentListener implements Listener { FurnaceBrewingHandling.removeBrewing(block); BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK); - + FastPayment fp = Jobs.FastPayment.get(player.getName()); if (fp != null) { if (fp.getTime() > System.currentTimeMillis()) { @@ -837,7 +837,7 @@ public class JobsPaymentListener implements Listener { Integer level = oneEnchant.getValue(); if (level == null) continue; - + Jobs.action(jPlayer, new EnchantActionInfo(enchantName, level, ActionType.ENCHANT)); } Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.ENCHANT)); @@ -1079,7 +1079,7 @@ public class JobsPaymentListener implements Listener { double damage = lVictim.getMetadata(entityDamageByPlayer).get(0).asDouble(); double perc = (damage * 100D) / lVictim.getMaxHealth(); if (perc < Jobs.getGCManager().MonsterDamagePercentage) - return; + return; } Jobs.action(jDamager, new EntityActionInfo(lVictim, ActionType.KILL), e.getDamager(), lVictim);