Particle system by @Sataniel98, see #632

This commit is contained in:
BuildTools 2019-01-14 19:27:56 -05:00
parent 8ec0199262
commit 0822ccb597
44 changed files with 306 additions and 2346 deletions

39
dist/pom.xml vendored
View File

@ -8,8 +8,8 @@
<version>3.6.0</version>
</parent>
<artifactId>quests-dist</artifactId>
<packaging>jar</packaging>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
@ -45,41 +45,6 @@
<artifactId>quests-main</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_13_R2</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_13_R1</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_12_R1</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_11_R1</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_10_R1</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_9_R2</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_9_R1</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_8_R3</artifactId>

View File

@ -1,7 +1,5 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>all-jar</id>
<formats>
<format>jar</format>

Binary file not shown.

BIN
lib/Heroes.jar Normal file

Binary file not shown.

Binary file not shown.

BIN
lib/Vault.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -38,6 +38,7 @@
<url>http://nexus.hc.to/content/repositories/pub_releases/</url>
</repository>
<repository>
<!-- For Parties -->
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>

View File

@ -18,16 +18,8 @@ import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import me.blackvein.quests.nms.v1_10_R1.particle.Eff_1_10_R1;
import me.blackvein.quests.nms.v1_11_R1.particle.Eff_1_11_R1;
import me.blackvein.quests.nms.v1_12_R1.particle.Eff_1_12_R1;
import me.blackvein.quests.nms.v1_13_R1.particle.Eff_1_13_R1;
import me.blackvein.quests.nms.v1_13_R2.particle.Eff_1_13_R2;
import me.blackvein.quests.nms.v1_8_R1.particle.Eff_1_8_R1;
import me.blackvein.quests.nms.v1_8_R2.particle.Eff_1_8_R2;
import me.blackvein.quests.nms.v1_8_R3.particle.Eff_1_8_R3;
import me.blackvein.quests.nms.v1_9_R1.particle.Eff_1_9_R1;
import me.blackvein.quests.nms.v1_9_R2.particle.Eff_1_9_R2;
import me.blackvein.quests.particle.ParticleProvider;
import net.citizensnpcs.api.npc.NPC;
public class NpcEffectThread implements Runnable {
@ -67,947 +59,9 @@ public class NpcEffectThread implements Runnable {
* @param effectType Value of EnumParticle such as NOTE or SMOKE
*/
public void showEffect(Player player, NPC npc, String effectType) {
try {
if (plugin.getDetectedBukkitVersion().contains("1.13.2")
|| plugin.getDetectedBukkitVersion().contains("1.13.1")) {
showEffect_1_13_R2(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.13")) {
showEffect_1_13_R1(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.12")) {
showEffect_1_12_R1(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.11")) {
showEffect_1_11_R1(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.10")) {
showEffect_1_10_R1(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.9.4")) {
showEffect_1_9_R2(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.9")) {
showEffect_1_9_R1(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.8.9")
|| plugin.getDetectedBukkitVersion().contains("1.8.8")
|| plugin.getDetectedBukkitVersion().contains("1.8.7")
|| plugin.getDetectedBukkitVersion().contains("1.8.6")
|| plugin.getDetectedBukkitVersion().contains("1.8.5")
|| plugin.getDetectedBukkitVersion().contains("1.8.4")) {
showEffect_1_8_R3(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.8.3")) {
showEffect_1_8_R2(player, npc, effectType);
} else if (plugin.getDetectedBukkitVersion().contains("1.8")) {
showEffect_1_8_R1(player, npc, effectType);
}
} catch (Exception e) {
plugin.getLogger().severe("Bukkit version detected as " + plugin.getDetectedBukkitVersion());
e.printStackTrace();
}
}
private void showEffect_1_13_R2(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_13_R2.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_13_R2.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_13_R2.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_13_R2.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_13_R2.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_13_R2.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_13_R2.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_13_R2.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_13_R2.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_13_R2.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_13_R2.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_13_R2.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_13_R2.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_13_R1(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_13_R1.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_13_R1.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_13_R1.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_13_R1.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_13_R1.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_13_R1.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_13_R1.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_13_R1.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_13_R1.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_13_R1.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_13_R1.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_13_R1.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_13_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
ParticleProvider.sendToPlayer(player, eyeLoc, effectType);
}
private void showEffect_1_12_R1(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_12_R1.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_12_R1.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_12_R1.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_12_R1.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_12_R1.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_12_R1.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_12_R1.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_12_R1.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_12_R1.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_12_R1.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_12_R1.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_12_R1.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_12_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_11_R1(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_11_R1.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_11_R1.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_11_R1.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_11_R1.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_11_R1.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_11_R1.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_11_R1.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_11_R1.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_11_R1.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_11_R1.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_11_R1.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_11_R1.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_11_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_10_R1(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_10_R1.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_10_R1.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_10_R1.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_10_R1.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_10_R1.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_10_R1.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_10_R1.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_10_R1.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_10_R1.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_10_R1.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_10_R1.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_10_R1.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_10_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_9_R2(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_9_R2.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_9_R2.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_9_R2.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_9_R2.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_9_R2.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_9_R2.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_9_R2.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_9_R2.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_9_R2.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_9_R2.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_9_R2.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_9_R2.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_9_R2.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_9_R1(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_9_R1.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_9_R1.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_9_R1.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_9_R1.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_9_R1.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_9_R1.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_9_R1.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_9_R1.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_9_R1.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_9_R1.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_9_R1.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_9_R1.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_9_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_8_R3(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_8_R3.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_8_R3.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_8_R3.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_8_R3.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_8_R3.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_8_R3.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_8_R3.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_8_R3.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_8_R3.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_8_R3.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_8_R3.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_8_R3.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_8_R3.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_8_R2(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.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 (effectType.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 (effectType.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 (effectType.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 (effectType.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 (effectType.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 (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_8_R2.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.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 (effectType.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 (effectType.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 (effectType.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 (effectType.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(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
private void showEffect_1_8_R1(Player player, NPC npc, String effectType) {
Location eyeLoc = npc.getEntity().getLocation();
eyeLoc.setY(eyeLoc.getY() + 1.5);
if (effectType.equalsIgnoreCase("enchant")) {
try {
Eff_1_8_R1.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("crit")) {
try {
Eff_1_8_R1.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("spell")) {
try {
Eff_1_8_R1.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("magiccrit")) {
try {
Eff_1_8_R1.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("mobspell")) {
try {
Eff_1_8_R1.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("note")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_8_R1.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("portal")) {
try {
Eff_1_8_R1.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("dust")) {
try {
Location newLoc = new Location(player.getWorld(), eyeLoc.getX(), eyeLoc.getY() + (float) 0.5, eyeLoc.getZ());
Eff_1_8_R1.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("witch")) {
try {
Eff_1_8_R1.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("snowball")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_8_R1.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("splash")) {
try {
Location old = eyeLoc;
Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ());
Eff_1_8_R1.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4, null);
} catch (Exception e) {
e.printStackTrace();
}
} else if (effectType.equalsIgnoreCase("smoke")) {
try {
Eff_1_8_R1.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20, null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
Eff_1_8_R1.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3, null);
} catch (Exception e) {
plugin.getLogger().info(effectType + " is not a valid effect name!");
}
}
}
}

View File

@ -2650,7 +2650,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
return hero.getHeroClass().getName().equalsIgnoreCase(primaryClass);
}
@SuppressWarnings("deprecation")
public boolean testSecondaryHeroesClass(String secondaryClass, UUID uuid) {
Hero hero = getHero(uuid);
return hero.getSecondClass().getName().equalsIgnoreCase(secondaryClass);

View File

@ -0,0 +1,127 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
****************************************************************************************************** */
package me.blackvein.quests.particle;
import java.util.Map;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
public abstract class ParticleProvider {
private static ParticleProvider loaded;
static {
try {
String packageName = ParticleProvider.class.getPackage().getName();
String internalsName = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
if (internalsName.startsWith("v1_8_R")) {
loaded = (ParticleProvider) Class.forName(packageName + "." + internalsName).newInstance();
} else {
loaded = new ParticleProvider_Bukkit();
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | ClassCastException exception) {
Bukkit.getLogger().log(Level.SEVERE, "Quests could not find a valid implementation for this server version.");
}
}
abstract Map<PreBuiltParticle, Object> getParticleMap();
abstract void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data);
/**
* Sends the particle to the player.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param particleId
* The particle identifier.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
*/
public static void sendToPlayer(Player player, Location location, String particleId, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
Object particle;
PreBuiltParticle pbp = PreBuiltParticle.fromIdentifier(particleId);
if (pbp != null) {
particle = loaded.getParticleMap().get(pbp);
} else {
try {
particle = Particle.valueOf(particleId);
} catch (IllegalArgumentException exception) {
return; // Fail silently
}
}
loaded.spawnParticle(player, location, particle, offsetX, offsetY, offsetZ, speed, count, data);
}
/**
* Sends the particle to the player.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param particleId
* The particle identifier.
*/
public static void sendToPlayer(Player player, Location location, String particleId) {
PreBuiltParticle particle = PreBuiltParticle.fromIdentifier(particleId);
if (particle != null) {
Location pos = location.clone();
if (particle.getVector() != null) {
pos.add(particle.getVector());
}
sendToPlayer(player, location, particle);
} else {
try {
loaded.spawnParticle(player, location, Particle.valueOf(particleId), 0, 0, 0, 1, 3, null);
} catch (IllegalArgumentException exception) {
// Fail silently
}
}
}
/**
* Sends the particle to the player.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param particle
* The pre-built particle.
*/
public static void sendToPlayer(Player player, Location location, PreBuiltParticle particle) {
Location pos = location.clone();
if (particle.getVector() != null) {
pos.add(particle.getVector());
}
loaded.spawnParticle(player, pos, loaded.getParticleMap().get(particle), particle.getOffsetX(), particle.getOffsetY(), particle.getOffsetZ(), particle.getSpeed(), particle.getCount(), null);
}
}

View File

@ -0,0 +1,49 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
****************************************************************************************************** */
package me.blackvein.quests.particle;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
class ParticleProvider_Bukkit extends ParticleProvider {
private static Map<PreBuiltParticle, Object> PARTICLES = new HashMap<>();
static {
PARTICLES.put(PreBuiltParticle.ENCHANT, Particle.ENCHANTMENT_TABLE);
PARTICLES.put(PreBuiltParticle.CRIT, Particle.CRIT);
PARTICLES.put(PreBuiltParticle.SPELL, Particle.SPELL_INSTANT);
PARTICLES.put(PreBuiltParticle.MAGIC_CRIT, Particle.CRIT_MAGIC);
PARTICLES.put(PreBuiltParticle.MOB_SPELL, Particle.SPELL_MOB);
PARTICLES.put(PreBuiltParticle.NOTE, Particle.NOTE);
PARTICLES.put(PreBuiltParticle.PORTAL, Particle.PORTAL);
PARTICLES.put(PreBuiltParticle.DUST, Particle.REDSTONE);
PARTICLES.put(PreBuiltParticle.WITCH, Particle.SPELL_WITCH);
PARTICLES.put(PreBuiltParticle.SNOWBALL, Particle.SNOWBALL);
PARTICLES.put(PreBuiltParticle.SPLASH, Particle.WATER_SPLASH);
PARTICLES.put(PreBuiltParticle.SMOKE, Particle.TOWN_AURA);
}
@Override
Map<PreBuiltParticle, Object> getParticleMap() {
return PARTICLES;
}
@Override
void spawnParticle(Player player, Location location, Object particle, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) {
player.spawnParticle((Particle) particle, location, count, offsetX, offsetY, offsetZ, speed, data);
}
}

View File

@ -0,0 +1,101 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
****************************************************************************************************** */
package me.blackvein.quests.particle;
import java.util.Map;
import java.util.stream.Stream;
import org.bukkit.util.Vector;
public enum PreBuiltParticle {
ENCHANT("enchant", 0, 1, 0, 1, 10),
CRIT("crit", 0, 0, 0, .35f, 3),
SPELL("spell", 0, 0, 0, 1, 3),
MAGIC_CRIT("magiccrit", 0, 0, 0, .35f, 3),
MOB_SPELL("mobspell", 0, 0, 0, 1, 3),
NOTE("note", 0, 0, 0, 1, 1, new Vector(0, .5, 0)),
PORTAL("portal", 0, 0, 0, 1, 5),
DUST("dust", 0, 0, 0, 1, 1, new Vector(0, .5, 0)),
WITCH("witch", 0, 0, 0, 1, 3),
SNOWBALL("snowball", 0, 0, 0, 1, 3),
SPLASH("splash", 0, 0, 0, 1, 4, new Vector(0, .5, 0)),
SMOKE("smoke", 0, 1, 0, 1, 20);
private static Map<String, PreBuiltParticle> FROM_IDENTIFIER;
static {
Stream.of(values()).forEach(p -> FROM_IDENTIFIER.put(p.identifier, p));
}
private String identifier;
private float offsetX, offsetY, offsetZ, speed;
private int count;
private Vector vector;
PreBuiltParticle(String identifier, float offsetX, float offsetY, float offsetZ, float speed, int count) {
this.identifier = identifier;
this.offsetX = offsetX;
this.offsetY = offsetY;
this.offsetZ = offsetZ;
this.speed = speed;
this.count = count;
}
PreBuiltParticle(String identifier, float offsetX, float offsetY, float offsetZ, float speed, int count, Vector vector) {
this(identifier, offsetX, offsetY, offsetZ, speed, count);
this.vector = vector;
}
public String getIdentifier() {
return identifier;
}
public float getOffsetX() {
return offsetX;
}
public float getOffsetY() {
return offsetY;
}
public float getOffsetZ() {
return offsetZ;
}
public float getSpeed() {
return speed;
}
public int getCount() {
return count;
}
/**
* Returns the vector applied to the default spawn location or null if the location isn't modified.
*
* @return the vector applied to the default spawn location or null if the location isn't modified
*/
public Vector getVector() {
return vector;
}
/**
* Returns the PreBuiltParticle represented by the specified identifier.
*
* @param identifier the identifier
* @return the PreBuiltParticle represented by the specified identifier
*/
public static PreBuiltParticle fromIdentifier(String identifier) {
return FROM_IDENTIFIER.get(identifier);
}
}

View File

@ -21,13 +21,6 @@
<module>v1_8_R1</module>
<module>v1_8_R2</module>
<module>v1_8_R3</module>
<module>v1_9_R1</module>
<module>v1_9_R2</module>
<module>v1_10_R1</module>
<module>v1_11_R1</module>
<module>v1_12_R1</module>
<module>v1_13_R1</module>
<module>v1_13_R2</module>
<module>dist</module>
</modules>

View File

@ -1,64 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_10_R1</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,129 +0,0 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************************************/
package me.blackvein.quests.nms.v1_10_R1.particle;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_10_R1.EnumParticle;
import net.minecraft.server.v1_10_R1.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_10_R1 Enum, it contains all valid effects that players can
* use with the 1.10 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.6.2
* @version 3
*/
public enum Eff_1_10_R1 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(EnumParticle.EXPLOSION_LARGE),
EXPLOSION_HUGE(EnumParticle.EXPLOSION_HUGE),
FIREWORKS_SPARK(EnumParticle.FIREWORKS_SPARK),
BUBBLE(EnumParticle.WATER_BUBBLE),
WAKE(EnumParticle.WATER_WAKE),
SPLASH(EnumParticle.WATER_SPLASH),
SUSPENDED(EnumParticle.SUSPENDED),
DEPTH_SUSPEND(EnumParticle.SUSPENDED_DEPTH),
CRIT(EnumParticle.CRIT),
MAGIC_CRIT(EnumParticle.CRIT_MAGIC),
SMOKE(EnumParticle.SMOKE_NORMAL),
LARGE_SMOKE(EnumParticle.SMOKE_LARGE),
SPELL(EnumParticle.SPELL),
INSTANT_SPELL(EnumParticle.SPELL_INSTANT),
MOB_SPELL(EnumParticle.SPELL_MOB),
MOB_SPELL_AMBIENT(EnumParticle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(EnumParticle.SPELL_WITCH),
DRIP_WATER(EnumParticle.DRIP_WATER),
DRIP_LAVA(EnumParticle.DRIP_LAVA),
ANGRY_VILLAGER(EnumParticle.VILLAGER_ANGRY),
HAPPY_VILLAGER(EnumParticle.VILLAGER_HAPPY),
TOWN_AURA(EnumParticle.TOWN_AURA),
NOTE(EnumParticle.NOTE),
PORTAL(EnumParticle.PORTAL),
ENCHANTMENT_TABLE(EnumParticle.ENCHANTMENT_TABLE),
FLAME(EnumParticle.FLAME),
LAVA(EnumParticle.LAVA),
FOOTSTEP(EnumParticle.FOOTSTEP),
CLOUD(EnumParticle.CLOUD),
RED_DUST(EnumParticle.REDSTONE),
SNOWBALL_POOF(EnumParticle.SNOWBALL),
SNOW_SHOVEL(EnumParticle.SNOW_SHOVEL),
SLIME(EnumParticle.SLIME),
HEART(EnumParticle.HEART),
BARRIER(EnumParticle.BARRIER),
ICONCRACK_(EnumParticle.ITEM_CRACK),
BLOCKCRACK_(EnumParticle.BLOCK_CRACK),
BLOCKDUST_(EnumParticle.BLOCK_DUST),
DROPLET(EnumParticle.WATER_DROP),
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE),
SWEEPING_DUST(EnumParticle.SWEEP_ATTACK),
DRAGON_BREATH(EnumParticle.DRAGON_BREATH),
ENDROD(EnumParticle.END_ROD),
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),
FALLING_DUST(EnumParticle.FALLING_DUST);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_10_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_10_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}

View File

@ -1,64 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_11_R1</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.11.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,131 +0,0 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************************************/
package me.blackvein.quests.nms.v1_11_R1.particle;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_11_R1.EnumParticle;
import net.minecraft.server.v1_11_R1.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_11_R1 Enum, it contains all valid effects that players can
* use with the 1.11 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.7.4
* @version 3
*/
public enum Eff_1_11_R1 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(EnumParticle.EXPLOSION_LARGE),
EXPLOSION_HUGE(EnumParticle.EXPLOSION_HUGE),
FIREWORKS_SPARK(EnumParticle.FIREWORKS_SPARK),
BUBBLE(EnumParticle.WATER_BUBBLE),
WAKE(EnumParticle.WATER_WAKE),
SPLASH(EnumParticle.WATER_SPLASH),
SUSPENDED(EnumParticle.SUSPENDED),
DEPTH_SUSPEND(EnumParticle.SUSPENDED_DEPTH),
CRIT(EnumParticle.CRIT),
MAGIC_CRIT(EnumParticle.CRIT_MAGIC),
SMOKE(EnumParticle.SMOKE_NORMAL),
LARGE_SMOKE(EnumParticle.SMOKE_LARGE),
SPELL(EnumParticle.SPELL),
INSTANT_SPELL(EnumParticle.SPELL_INSTANT),
MOB_SPELL(EnumParticle.SPELL_MOB),
MOB_SPELL_AMBIENT(EnumParticle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(EnumParticle.SPELL_WITCH),
DRIP_WATER(EnumParticle.DRIP_WATER),
DRIP_LAVA(EnumParticle.DRIP_LAVA),
ANGRY_VILLAGER(EnumParticle.VILLAGER_ANGRY),
HAPPY_VILLAGER(EnumParticle.VILLAGER_HAPPY),
TOWN_AURA(EnumParticle.TOWN_AURA),
NOTE(EnumParticle.NOTE),
PORTAL(EnumParticle.PORTAL),
ENCHANTMENT_TABLE(EnumParticle.ENCHANTMENT_TABLE),
FLAME(EnumParticle.FLAME),
LAVA(EnumParticle.LAVA),
FOOTSTEP(EnumParticle.FOOTSTEP),
CLOUD(EnumParticle.CLOUD),
RED_DUST(EnumParticle.REDSTONE),
SNOWBALL_POOF(EnumParticle.SNOWBALL),
SNOW_SHOVEL(EnumParticle.SNOW_SHOVEL),
SLIME(EnumParticle.SLIME),
HEART(EnumParticle.HEART),
BARRIER(EnumParticle.BARRIER),
ICONCRACK_(EnumParticle.ITEM_CRACK),
BLOCKCRACK_(EnumParticle.BLOCK_CRACK),
BLOCKDUST_(EnumParticle.BLOCK_DUST),
DROPLET(EnumParticle.WATER_DROP),
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE),
SWEEPING_DUST(EnumParticle.SWEEP_ATTACK),
DRAGON_BREATH(EnumParticle.DRAGON_BREATH),
ENDROD(EnumParticle.END_ROD),
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),
FALLING_DUST(EnumParticle.FALLING_DUST),
SPIT(EnumParticle.SPIT),
TOTEM(EnumParticle.TOTEM);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_11_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_11_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}

View File

@ -1,64 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_12_R1</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,131 +0,0 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************************************/
package me.blackvein.quests.nms.v1_12_R1.particle;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_12_R1.EnumParticle;
import net.minecraft.server.v1_12_R1.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_12_R1 Enum, it contains all valid effects that players can
* use with the 1.12 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.8.0
* @version 3
*/
public enum Eff_1_12_R1 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(EnumParticle.EXPLOSION_LARGE),
EXPLOSION_HUGE(EnumParticle.EXPLOSION_HUGE),
FIREWORKS_SPARK(EnumParticle.FIREWORKS_SPARK),
BUBBLE(EnumParticle.WATER_BUBBLE),
WAKE(EnumParticle.WATER_WAKE),
SPLASH(EnumParticle.WATER_SPLASH),
SUSPENDED(EnumParticle.SUSPENDED),
DEPTH_SUSPEND(EnumParticle.SUSPENDED_DEPTH),
CRIT(EnumParticle.CRIT),
MAGIC_CRIT(EnumParticle.CRIT_MAGIC),
SMOKE(EnumParticle.SMOKE_NORMAL),
LARGE_SMOKE(EnumParticle.SMOKE_LARGE),
SPELL(EnumParticle.SPELL),
INSTANT_SPELL(EnumParticle.SPELL_INSTANT),
MOB_SPELL(EnumParticle.SPELL_MOB),
MOB_SPELL_AMBIENT(EnumParticle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(EnumParticle.SPELL_WITCH),
DRIP_WATER(EnumParticle.DRIP_WATER),
DRIP_LAVA(EnumParticle.DRIP_LAVA),
ANGRY_VILLAGER(EnumParticle.VILLAGER_ANGRY),
HAPPY_VILLAGER(EnumParticle.VILLAGER_HAPPY),
TOWN_AURA(EnumParticle.TOWN_AURA),
NOTE(EnumParticle.NOTE),
PORTAL(EnumParticle.PORTAL),
ENCHANTMENT_TABLE(EnumParticle.ENCHANTMENT_TABLE),
FLAME(EnumParticle.FLAME),
LAVA(EnumParticle.LAVA),
FOOTSTEP(EnumParticle.FOOTSTEP),
CLOUD(EnumParticle.CLOUD),
RED_DUST(EnumParticle.REDSTONE),
SNOWBALL_POOF(EnumParticle.SNOWBALL),
SNOW_SHOVEL(EnumParticle.SNOW_SHOVEL),
SLIME(EnumParticle.SLIME),
HEART(EnumParticle.HEART),
BARRIER(EnumParticle.BARRIER),
ICONCRACK_(EnumParticle.ITEM_CRACK),
BLOCKCRACK_(EnumParticle.BLOCK_CRACK),
BLOCKDUST_(EnumParticle.BLOCK_DUST),
DROPLET(EnumParticle.WATER_DROP),
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE),
SWEEPING_DUST(EnumParticle.SWEEP_ATTACK),
DRAGON_BREATH(EnumParticle.DRAGON_BREATH),
ENDROD(EnumParticle.END_ROD),
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),
FALLING_DUST(EnumParticle.FALLING_DUST),
SPIT(EnumParticle.SPIT),
TOTEM(EnumParticle.TOTEM);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_12_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_12_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}

View File

@ -1,64 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_13_R1</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,121 +0,0 @@
package me.blackvein.quests.nms.v1_13_R1.particle;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.craftbukkit.v1_13_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
/**
* This is the Eff_1_13_R1 Enum, it contains all valid effects that players can
* use with the 1.13 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 3.3.5
* @version 3
*/
public enum Eff_1_13_R1 {
EXPLOSION(Particle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(Particle.EXPLOSION_LARGE),
EXPLOSION_HUGE(Particle.EXPLOSION_HUGE),
FIREWORKS_SPARK(Particle.FIREWORKS_SPARK),
BUBBLE(Particle.WATER_BUBBLE),
WAKE(Particle.WATER_WAKE),
SPLASH(Particle.WATER_SPLASH),
SUSPENDED(Particle.SUSPENDED),
DEPTH_SUSPEND(Particle.SUSPENDED_DEPTH),
CRIT(Particle.CRIT),
MAGIC_CRIT(Particle.CRIT_MAGIC),
SMOKE(Particle.SMOKE_NORMAL),
LARGE_SMOKE(Particle.SMOKE_LARGE),
SPELL(Particle.SPELL),
INSTANT_SPELL(Particle.SPELL_INSTANT),
MOB_SPELL(Particle.SPELL_MOB),
MOB_SPELL_AMBIENT(Particle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(Particle.SPELL_WITCH),
DRIP_WATER(Particle.DRIP_WATER),
DRIP_LAVA(Particle.DRIP_LAVA),
ANGRY_VILLAGER(Particle.VILLAGER_ANGRY),
HAPPY_VILLAGER(Particle.VILLAGER_HAPPY),
TOWN_AURA(Particle.TOWN_AURA),
NOTE(Particle.NOTE),
PORTAL(Particle.PORTAL),
ENCHANTMENT_TABLE(Particle.ENCHANTMENT_TABLE),
FLAME(Particle.FLAME),
LAVA(Particle.LAVA),
CLOUD(Particle.CLOUD),
RED_DUST(Particle.REDSTONE),
SNOWBALL_POOF(Particle.SNOWBALL),
SNOW_SHOVEL(Particle.SNOW_SHOVEL),
SLIME(Particle.SLIME),
HEART(Particle.HEART),
BARRIER(Particle.BARRIER),
ICONCRACK_(Particle.ITEM_CRACK),
BLOCKCRACK_(Particle.BLOCK_CRACK),
BLOCKDUST_(Particle.BLOCK_DUST),
DROPLET(Particle.WATER_DROP),
MOB_APPEARANCE(Particle.MOB_APPEARANCE),
SWEEPING_DUST(Particle.SWEEP_ATTACK),
DRAGON_BREATH(Particle.DRAGON_BREATH),
ENDROD(Particle.END_ROD),
DAMAGE_INDICATOR(Particle.DAMAGE_INDICATOR),
FALLING_DUST(Particle.FALLING_DUST),
SPIT(Particle.SPIT),
TOTEM(Particle.TOTEM),
BUBBLE_COLUMN_UP(Particle.BUBBLE_COLUMN_UP),
BUBBLE_POP(Particle.BUBBLE_POP),
CURRENT_DOWN(Particle.CURRENT_DOWN),
SQUID_INK(Particle.SQUID_INK),
NAUTILUS(Particle.NAUTILUS),
DOLPHIN(Particle.DOLPHIN);
/**
* The NMS Particle to be sent to the player.
*/
private final Particle particleEnum;
/**
* Create a new instance of the Eff_1_13_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_13_R1(Particle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
((CraftPlayer) player).spawnParticle(particleEnum, location, count, offsetX, offsetY, offsetZ, speed, data);
}
}

View File

@ -1,60 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<artifactId>quests-v1_13_R2</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,120 +0,0 @@
package me.blackvein.quests.nms.v1_13_R2.particle;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
/**
* This is the Eff_1_13_R2 Enum, it contains all valid effects that players can
* use with the 1.13.2 server version.
*
* @author FlyingPikachu
* @since 3.4.1
* @version 3
*/
public enum Eff_1_13_R2 {
EXPLOSION(Particle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(Particle.EXPLOSION_LARGE),
EXPLOSION_HUGE(Particle.EXPLOSION_HUGE),
FIREWORKS_SPARK(Particle.FIREWORKS_SPARK),
BUBBLE(Particle.WATER_BUBBLE),
WAKE(Particle.WATER_WAKE),
SPLASH(Particle.WATER_SPLASH),
SUSPENDED(Particle.SUSPENDED),
DEPTH_SUSPEND(Particle.SUSPENDED_DEPTH),
CRIT(Particle.CRIT),
MAGIC_CRIT(Particle.CRIT_MAGIC),
SMOKE(Particle.SMOKE_NORMAL),
LARGE_SMOKE(Particle.SMOKE_LARGE),
SPELL(Particle.SPELL),
INSTANT_SPELL(Particle.SPELL_INSTANT),
MOB_SPELL(Particle.SPELL_MOB),
MOB_SPELL_AMBIENT(Particle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(Particle.SPELL_WITCH),
DRIP_WATER(Particle.DRIP_WATER),
DRIP_LAVA(Particle.DRIP_LAVA),
ANGRY_VILLAGER(Particle.VILLAGER_ANGRY),
HAPPY_VILLAGER(Particle.VILLAGER_HAPPY),
TOWN_AURA(Particle.TOWN_AURA),
NOTE(Particle.NOTE),
PORTAL(Particle.PORTAL),
ENCHANTMENT_TABLE(Particle.ENCHANTMENT_TABLE),
FLAME(Particle.FLAME),
LAVA(Particle.LAVA),
CLOUD(Particle.CLOUD),
RED_DUST(Particle.REDSTONE),
SNOWBALL_POOF(Particle.SNOWBALL),
SNOW_SHOVEL(Particle.SNOW_SHOVEL),
SLIME(Particle.SLIME),
HEART(Particle.HEART),
BARRIER(Particle.BARRIER),
ICONCRACK_(Particle.ITEM_CRACK),
BLOCKCRACK_(Particle.BLOCK_CRACK),
BLOCKDUST_(Particle.BLOCK_DUST),
DROPLET(Particle.WATER_DROP),
MOB_APPEARANCE(Particle.MOB_APPEARANCE),
SWEEPING_DUST(Particle.SWEEP_ATTACK),
DRAGON_BREATH(Particle.DRAGON_BREATH),
ENDROD(Particle.END_ROD),
DAMAGE_INDICATOR(Particle.DAMAGE_INDICATOR),
FALLING_DUST(Particle.FALLING_DUST),
SPIT(Particle.SPIT),
TOTEM(Particle.TOTEM),
BUBBLE_COLUMN_UP(Particle.BUBBLE_COLUMN_UP),
BUBBLE_POP(Particle.BUBBLE_POP),
CURRENT_DOWN(Particle.CURRENT_DOWN),
SQUID_INK(Particle.SQUID_INK),
NAUTILUS(Particle.NAUTILUS),
DOLPHIN(Particle.DOLPHIN);
/**
* The NMS Particle to be sent to the player.
*/
private final Particle particleEnum;
/**
* Create a new instance of the Eff_1_13_R2 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_13_R2(Particle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
((CraftPlayer) player).spawnParticle(particleEnum, location, count, offsetX, offsetY, offsetZ, speed, data);
}
}

View File

@ -1,11 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_8_R1</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
@ -23,6 +19,12 @@
<version>1.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-main</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@ -1,11 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_8_R2</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
@ -23,6 +19,12 @@
<version>1.8.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-main</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@ -1,11 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_8_R3</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
@ -23,6 +19,12 @@
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-main</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@ -1,64 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_9_R1</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.9.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,129 +0,0 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************************************/
package me.blackvein.quests.nms.v1_9_R1.particle;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_9_R1.EnumParticle;
import net.minecraft.server.v1_9_R1.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_9_R1 Enum, it contains all valid effects that players can
* use with the 1.9 server version.
*
* @author FlyingPikachu
* @author woutwoot
* @author GregZ_
* @since 2.6.0
* @version 5
*/
public enum Eff_1_9_R1 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(EnumParticle.EXPLOSION_LARGE),
EXPLOSION_HUGE(EnumParticle.EXPLOSION_HUGE),
FIREWORKS_SPARK(EnumParticle.FIREWORKS_SPARK),
BUBBLE(EnumParticle.WATER_BUBBLE),
WAKE(EnumParticle.WATER_WAKE),
SPLASH(EnumParticle.WATER_SPLASH),
SUSPENDED(EnumParticle.SUSPENDED),
DEPTH_SUSPEND(EnumParticle.SUSPENDED_DEPTH),
CRIT(EnumParticle.CRIT),
MAGIC_CRIT(EnumParticle.CRIT_MAGIC),
SMOKE(EnumParticle.SMOKE_NORMAL),
LARGE_SMOKE(EnumParticle.SMOKE_LARGE),
SPELL(EnumParticle.SPELL),
INSTANT_SPELL(EnumParticle.SPELL_INSTANT),
MOB_SPELL(EnumParticle.SPELL_MOB),
MOB_SPELL_AMBIENT(EnumParticle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(EnumParticle.SPELL_WITCH),
DRIP_WATER(EnumParticle.DRIP_WATER),
DRIP_LAVA(EnumParticle.DRIP_LAVA),
ANGRY_VILLAGER(EnumParticle.VILLAGER_ANGRY),
HAPPY_VILLAGER(EnumParticle.VILLAGER_HAPPY),
TOWN_AURA(EnumParticle.TOWN_AURA),
NOTE(EnumParticle.NOTE),
PORTAL(EnumParticle.PORTAL),
ENCHANTMENT_TABLE(EnumParticle.ENCHANTMENT_TABLE),
FLAME(EnumParticle.FLAME),
LAVA(EnumParticle.LAVA),
FOOTSTEP(EnumParticle.FOOTSTEP),
CLOUD(EnumParticle.CLOUD),
RED_DUST(EnumParticle.REDSTONE),
SNOWBALL_POOF(EnumParticle.SNOWBALL),
SNOW_SHOVEL(EnumParticle.SNOW_SHOVEL),
SLIME(EnumParticle.SLIME),
HEART(EnumParticle.HEART),
BARRIER(EnumParticle.BARRIER),
ICONCRACK_(EnumParticle.ITEM_CRACK),
BLOCKCRACK_(EnumParticle.BLOCK_CRACK),
BLOCKDUST_(EnumParticle.BLOCK_DUST),
DROPLET(EnumParticle.WATER_DROP),
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE),
SWEEPING_DUST(EnumParticle.SWEEP_ATTACK),
DRAGON_BREATH(EnumParticle.DRAGON_BREATH),
ENDROD(EnumParticle.END_ROD),
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),;
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_9_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_9_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}

View File

@ -1,64 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-v1_9_R2</artifactId>
<version>3.6.0</version>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>
<parent>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,128 +0,0 @@
/*******************************************************************************************************
* Continued by FlyingPikachu/HappyPikachu with permission from _Blackvein_. All rights reserved.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************************************/
package me.blackvein.quests.nms.v1_9_R2.particle;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_9_R2.EnumParticle;
import net.minecraft.server.v1_9_R2.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_9_R2 Enum, it contains all valid effects that players can
* use with the 1.9.4 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.6.1
* @version 4
*/
public enum Eff_1_9_R2 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
EXPLOSION_LARGE(EnumParticle.EXPLOSION_LARGE),
EXPLOSION_HUGE(EnumParticle.EXPLOSION_HUGE),
FIREWORKS_SPARK(EnumParticle.FIREWORKS_SPARK),
BUBBLE(EnumParticle.WATER_BUBBLE),
WAKE(EnumParticle.WATER_WAKE),
SPLASH(EnumParticle.WATER_SPLASH),
SUSPENDED(EnumParticle.SUSPENDED),
DEPTH_SUSPEND(EnumParticle.SUSPENDED_DEPTH),
CRIT(EnumParticle.CRIT),
MAGIC_CRIT(EnumParticle.CRIT_MAGIC),
SMOKE(EnumParticle.SMOKE_NORMAL),
LARGE_SMOKE(EnumParticle.SMOKE_LARGE),
SPELL(EnumParticle.SPELL),
INSTANT_SPELL(EnumParticle.SPELL_INSTANT),
MOB_SPELL(EnumParticle.SPELL_MOB),
MOB_SPELL_AMBIENT(EnumParticle.SPELL_MOB_AMBIENT),
WITCH_MAGIC(EnumParticle.SPELL_WITCH),
DRIP_WATER(EnumParticle.DRIP_WATER),
DRIP_LAVA(EnumParticle.DRIP_LAVA),
ANGRY_VILLAGER(EnumParticle.VILLAGER_ANGRY),
HAPPY_VILLAGER(EnumParticle.VILLAGER_HAPPY),
TOWN_AURA(EnumParticle.TOWN_AURA),
NOTE(EnumParticle.NOTE),
PORTAL(EnumParticle.PORTAL),
ENCHANTMENT_TABLE(EnumParticle.ENCHANTMENT_TABLE),
FLAME(EnumParticle.FLAME),
LAVA(EnumParticle.LAVA),
FOOTSTEP(EnumParticle.FOOTSTEP),
CLOUD(EnumParticle.CLOUD),
RED_DUST(EnumParticle.REDSTONE),
SNOWBALL_POOF(EnumParticle.SNOWBALL),
SNOW_SHOVEL(EnumParticle.SNOW_SHOVEL),
SLIME(EnumParticle.SLIME),
HEART(EnumParticle.HEART),
BARRIER(EnumParticle.BARRIER),
ICONCRACK_(EnumParticle.ITEM_CRACK),
BLOCKCRACK_(EnumParticle.BLOCK_CRACK),
BLOCKDUST_(EnumParticle.BLOCK_DUST),
DROPLET(EnumParticle.WATER_DROP),
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE),
SWEEPING_DUST(EnumParticle.SWEEP_ATTACK),
DRAGON_BREATH(EnumParticle.DRAGON_BREATH),
ENDROD(EnumParticle.END_ROD),
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),;
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_9_R2 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_9_R2(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}