mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-22 09:08:05 +01:00
Update for Spigot 1.8.3
This commit is contained in:
parent
a1a0d98252
commit
f215bca7a4
19
pom.xml
19
pom.xml
@ -31,28 +31,33 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.8-R0.1-SNAPSHOT</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/craftbukkit-1.8.jar</systemPath>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit1</artifactId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.8-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit1710</artifactId>
|
||||
<version>1.7.10-R0.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/craftbukkit-1.7.10-R0.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit3</artifactId>
|
||||
<artifactId>bukkit179</artifactId>
|
||||
<version>1.7.9-R0.3</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/craftbukkit-1.7.9-R0.3.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit2</artifactId>
|
||||
<artifactId>bukkit172</artifactId>
|
||||
<version>1.7.2-R0.4</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/craftbukkit-1.7.2-R0.4.jar</systemPath>
|
||||
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import me.blackvein.particles.Eff_1_7_R1;
|
||||
import me.blackvein.particles.Eff_1_7_R4;
|
||||
import me.blackvein.particles.Eff_1_8_R1;
|
||||
import me.blackvein.particles.Eff_1_8_R2;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -65,6 +66,128 @@ public class NpcEffectThread implements Runnable {
|
||||
showEffect_R4(player, npc);
|
||||
} else if (Bukkit.getBukkitVersion().contains("1.8")) {
|
||||
showEffect_1_8_R1(player, npc);
|
||||
} else if (Bukkit.getBukkitVersion().contains("1.8.3")) {
|
||||
showEffect_1_8_R2(player, npc);
|
||||
}
|
||||
}
|
||||
|
||||
private static void showEffect_1_8_R2(Player player, NPC npc) {
|
||||
|
||||
//Get and set eye location, because npc.getBukkitEntity() is deprecated.
|
||||
Location eyeLoc = npc.getEntity().getLocation();
|
||||
eyeLoc.setY(eyeLoc.getY() + 1.5);
|
||||
|
||||
if (Quests.effect.equalsIgnoreCase("enchant")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("crit")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("spell")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("magiccrit")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("mobspell")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("note")) {
|
||||
|
||||
try {
|
||||
Location old = eyeLoc;
|
||||
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
|
||||
Eff_1_8_R2.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("portal")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("dust")) {
|
||||
|
||||
try {
|
||||
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
|
||||
Eff_1_8_R2.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("witch")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("snowball")) {
|
||||
|
||||
try {
|
||||
Location old = eyeLoc;
|
||||
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
|
||||
Eff_1_8_R2.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("splash")) {
|
||||
|
||||
try {
|
||||
Location old = eyeLoc;
|
||||
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
|
||||
Eff_1_8_R2.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (Quests.effect.equalsIgnoreCase("smoke")) {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
try {
|
||||
Eff_1_8_R2.valueOf(Quests.effect).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
|
||||
} catch (Exception e) {
|
||||
Quests.getInstance().getLogger().info(Quests.effect + " is not a valid effect name!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user