mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-18 15:18:34 +01:00
Show Bukkit version if improperly detected
This commit is contained in:
parent
71b0adfb4e
commit
f2fc09d0bc
@ -76,7 +76,7 @@ public enum Eff_1_13_R2 {
|
||||
private final Particle particleEnum;
|
||||
|
||||
/**
|
||||
* Create a new instance of the Eff_1_13_R1 enum with the given particle type
|
||||
* Create a new instance of the Eff_1_13_R2 enum with the given particle type
|
||||
* to be sent.
|
||||
*
|
||||
* @param particleEnum
|
||||
|
@ -62,8 +62,14 @@ public class NpcEffectThread implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
// effectType is either effectType or Quests.repeatEffect
|
||||
/**
|
||||
* Display a particle effect above an NPC one time
|
||||
* @param player Target player to let view the effect
|
||||
* @param npc Target NPC to place the effect above
|
||||
* @param effectType Value of EnumParticle such as NOTE or SMOKE
|
||||
*/
|
||||
private void showEffect(Player player, NPC npc, String effectType) {
|
||||
try {
|
||||
if (Quests.bukkitVersion >= 1132) {
|
||||
showEffect_1_13_R2(player, npc, effectType);
|
||||
} else if (Quests.bukkitVersion >= 113) {
|
||||
@ -89,6 +95,10 @@ public class NpcEffectThread implements Runnable {
|
||||
} else if (Quests.bukkitVersion >= 179) {
|
||||
showEffect_R3(player, npc, effectType);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
plugin.getLogger().severe("Bukkit version detected as " + Quests.bukkitVersion);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void showEffect_1_13_R2(Player player, NPC npc, String effectType) {
|
||||
|
@ -101,7 +101,6 @@ public class LocaleQuery {
|
||||
public String queryByType(Material material) throws IllegalArgumentException{
|
||||
try {
|
||||
Object item = MethodUtils.invokeExactStaticMethod(craftMagicNumbers,"getItem", material);
|
||||
|
||||
if (item == null) {
|
||||
throw new IllegalArgumentException("An item with that material could not be found! (Perhaps you have specified a block?)");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user