Update for MC 1.13, tested. Bump version number

This commit is contained in:
HappyPikachu 2018-07-31 14:54:42 -04:00
parent 53cb3c6b10
commit fc494bad75
5 changed files with 21 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>3.3.5</version>
<version>3.3.6</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
@ -39,6 +39,13 @@
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit113</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/craftbukkit-1.13.jar</systemPath>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit112</artifactId>

View File

@ -176,7 +176,7 @@ public class NpcEffectThread implements Runnable {
try {
Eff_1_13_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getInstance().getLogger().info(effectType + " is not a valid effect name!");
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
@ -268,7 +268,7 @@ public class NpcEffectThread implements Runnable {
try {
Eff_1_12_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getInstance().getLogger().info(effectType + " is not a valid effect name!");
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}

View File

@ -185,6 +185,7 @@ public class PlayerListener implements Listener {
}
}
@SuppressWarnings("deprecation") // since 1.13
@EventHandler
public void onPlayerInteract(PlayerInteractEvent evt) {
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
@ -354,6 +355,7 @@ public class PlayerListener implements Listener {
}
}
@SuppressWarnings("deprecation") // since 1.13
@EventHandler
public void onBlockDamage(BlockDamageEvent evt) {
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {
@ -367,6 +369,7 @@ public class PlayerListener implements Listener {
}
}
@SuppressWarnings("deprecation") // since 1.13
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockPlace(BlockPlaceEvent evt) {
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {

View File

@ -1593,6 +1593,7 @@ public class Quester {
return prettyString;
}
@SuppressWarnings("deprecation") // since 1.13
public static String enchantmentString(Enchantment e) {
try {
return (Lang.get("ENCHANTMENT_" + e.getName()));

View File

@ -43,6 +43,7 @@ import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.Location;
@ -3118,7 +3119,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
} else if (color.equalsIgnoreCase("Red")) {
oStage.sheepToShear.put(DyeColor.RED, shearAmounts.get(sheep.indexOf(color)));
} else if (color.equalsIgnoreCase("Silver")) {
oStage.sheepToShear.put(DyeColor.SILVER, shearAmounts.get(sheep.indexOf(color)));
// 1.13 changed DyeColor.SILVER -> DyeColor.LIGHT_GRAY
oStage.sheepToShear.put(DyeColor.getByColor(Color.SILVER), shearAmounts.get(sheep.indexOf(color)));
} else if (color.equalsIgnoreCase("White")) {
oStage.sheepToShear.put(DyeColor.WHITE, shearAmounts.get(sheep.indexOf(color)));
} else if (color.equalsIgnoreCase("Yellow")) {
@ -3873,7 +3875,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
}
return count - subtract;
}
@SuppressWarnings("deprecation") // since 1.13
public static Enchantment getEnchantment(String enchant) {
String ench = Lang.getKey(enchant.replaceAll(" ", ""));
ench = ench.replace("ENCHANTMENT_", "");
@ -3981,8 +3984,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
return DyeColor.PURPLE;
} else if (s.equalsIgnoreCase("Red")) {
return DyeColor.RED;
// 1.13 changed DyeColor.SILVER -> DyeColor.LIGHT_GRAY
} else if (s.equalsIgnoreCase("Silver")) {
return DyeColor.SILVER;
return DyeColor.getByColor(Color.SILVER);
} else if (s.equalsIgnoreCase("White")) {
return DyeColor.WHITE;
} else if (s.equalsIgnoreCase("Yellow")) {