1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 14:05:25 +01:00

Glowing Redstone to regular one for 1.13

This commit is contained in:
Zrips 2018-10-15 14:01:51 +03:00
parent 0fb849abca
commit 6d239bf83d
3 changed files with 18 additions and 7 deletions

View File

@ -450,7 +450,6 @@ public class editjobs implements Cmd {
} }
c: if (material != null) { c: if (material != null) {
// Need to include thos ones and count as regular blocks // Need to include thos ones and count as regular blocks
@ -479,11 +478,15 @@ public class editjobs implements Cmd {
break; 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 + "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 + "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 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."); 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; material = CMIMaterial.REDSTONE_ORE;
} }

View File

@ -273,11 +273,15 @@ public class ConfigManager {
* future this hack may be removed and anybody using REDSTONE_ORE will have their * future this hack may be removed and anybody using REDSTONE_ORE will have their
* configurations broken. * 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("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("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 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."); 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; material = CMIMaterial.REDSTONE_ORE;
} }
// END HACK // END HACK
@ -1032,11 +1036,15 @@ public class ConfigManager {
* future this hack may be removed and anybody using REDSTONE_ORE will have their * future this hack may be removed and anybody using REDSTONE_ORE will have their
* configurations broken. * 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("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("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 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."); 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; material = CMIMaterial.REDSTONE_ORE;
} }
// END HACK // END HACK