diff --git a/.gitignore b/.gitignore index 8e1520400..ae30cdd8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,27 +1,28 @@ -# Ignore IDEA files -/.idea -*.iml -/bin/ - -# Eclipse files -/.settings/ -*.project -*.classpath -*.recommenders - -# NetBeans files -nbproject/private/ -build/ -nbbuild/ -dist/ -nbdist/ -.nb-gradle/ - -# Maven files -/target - -# Java files -*.class -*.log -*.ctxt -hs_err_pid* \ No newline at end of file +# Ignore IDEA files +/.idea +*.iml +/bin/ + +# Eclipse files +/.settings/ +*.project +*.classpath +*.recommenders + +# NetBeans files +nbproject/private/ +build/ +nbbuild/ +nbdist/ +.nb-gradle/ + +# Maven files +*/target +*dependency-reduced-pom.xml + +# Java files +*.class +*.log +*.ctxt +hs_err_pid* +/target/ diff --git a/dist/pom.xml b/dist/pom.xml new file mode 100644 index 000000000..35477d9f7 --- /dev/null +++ b/dist/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + me.blackvein.quests + quests-parent + 3.6.0 + + quests-dist + pom + + + + + org.apache.maven.plugins + maven-assembly-plugin + + Quests-${project.version} + false + + 2.2 + + + package-all + package + + single + + + false + + src/main/assembly/all-jar.xml + + + + + + + + + + + me.blackvein.quests + quests-main + ${project.parent.version} + + + me.blackvein.quests + quests-v1_8_R3 + ${project.parent.version} + + + me.blackvein.quests + quests-v1_8_R2 + ${project.parent.version} + + + me.blackvein.quests + quests-v1_8_R1 + ${project.parent.version} + + + \ No newline at end of file diff --git a/dist/src/main/assembly/all-jar.xml b/dist/src/main/assembly/all-jar.xml new file mode 100644 index 000000000..e649416ff --- /dev/null +++ b/dist/src/main/assembly/all-jar.xml @@ -0,0 +1,15 @@ + + all-jar + + jar + + false + + + + true + false + + + \ No newline at end of file diff --git a/lib/Parties-2.4.7.jar b/lib/Parties-2.4.7.jar new file mode 100644 index 000000000..230df37aa Binary files /dev/null and b/lib/Parties-2.4.7.jar differ diff --git a/lib/craftbukkit-1.10.jar b/lib/craftbukkit-1.10.jar deleted file mode 100644 index c220d500f..000000000 Binary files a/lib/craftbukkit-1.10.jar and /dev/null differ diff --git a/lib/craftbukkit-1.11.jar b/lib/craftbukkit-1.11.jar deleted file mode 100644 index 5b012fb31..000000000 Binary files a/lib/craftbukkit-1.11.jar and /dev/null differ diff --git a/lib/craftbukkit-1.12.jar b/lib/craftbukkit-1.12.jar deleted file mode 100644 index a56265ca5..000000000 Binary files a/lib/craftbukkit-1.12.jar and /dev/null differ diff --git a/lib/craftbukkit-1.13.2.jar b/lib/craftbukkit-1.13.2.jar deleted file mode 100644 index 0501f357e..000000000 Binary files a/lib/craftbukkit-1.13.2.jar and /dev/null differ diff --git a/lib/craftbukkit-1.13.jar b/lib/craftbukkit-1.13.jar deleted file mode 100644 index c306c3920..000000000 Binary files a/lib/craftbukkit-1.13.jar and /dev/null differ diff --git a/lib/craftbukkit-1.7.10-R0.1.jar b/lib/craftbukkit-1.7.10-R0.1.jar deleted file mode 100644 index 02d4bc7fc..000000000 Binary files a/lib/craftbukkit-1.7.10-R0.1.jar and /dev/null differ diff --git a/lib/craftbukkit-1.7.2-R0.4.jar b/lib/craftbukkit-1.7.2-R0.4.jar deleted file mode 100644 index 024639cd9..000000000 Binary files a/lib/craftbukkit-1.7.2-R0.4.jar and /dev/null differ diff --git a/lib/craftbukkit-1.7.9-R0.3.jar b/lib/craftbukkit-1.7.9-R0.3.jar deleted file mode 100644 index 392cb0aa9..000000000 Binary files a/lib/craftbukkit-1.7.9-R0.3.jar and /dev/null differ diff --git a/lib/craftbukkit-1.8.3.jar b/lib/craftbukkit-1.8.3.jar deleted file mode 100644 index 80d7cb63a..000000000 Binary files a/lib/craftbukkit-1.8.3.jar and /dev/null differ diff --git a/lib/craftbukkit-1.8.6.jar b/lib/craftbukkit-1.8.6.jar deleted file mode 100644 index 88073293a..000000000 Binary files a/lib/craftbukkit-1.8.6.jar and /dev/null differ diff --git a/lib/craftbukkit-1.8.jar b/lib/craftbukkit-1.8.jar deleted file mode 100644 index 2b384aa08..000000000 Binary files a/lib/craftbukkit-1.8.jar and /dev/null differ diff --git a/lib/craftbukkit-1.9.2.jar b/lib/craftbukkit-1.9.2.jar deleted file mode 100644 index c3e09141a..000000000 Binary files a/lib/craftbukkit-1.9.2.jar and /dev/null differ diff --git a/lib/craftbukkit-1.9.4.jar b/lib/craftbukkit-1.9.4.jar deleted file mode 100644 index d80bcb065..000000000 Binary files a/lib/craftbukkit-1.9.4.jar and /dev/null differ diff --git a/main/pom.xml b/main/pom.xml new file mode 100644 index 000000000..e9b266268 --- /dev/null +++ b/main/pom.xml @@ -0,0 +1,161 @@ + + 4.0.0 + + me.blackvein.quests + quests-parent + 3.6.0 + + quests-main + + + UTF-8 + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + citizens + http://repo.citizensnpcs.co/ + + + sk89q-repo + http://maven.sk89q.com/repo/ + + + placeholderapi + http://repo.extendedclip.com/content/repositories/placeholderapi/ + + + heroes-stripped + http://nexus.hc.to/content/repositories/pub_releases/ + + + Vault + http://nexus.hc.to/content/repositories/pub_releases/ + + + + jitpack.io + https://jitpack.io + + + + + + org.bukkit + bukkit + 1.13.2-R0.1-SNAPSHOT + provided + + + net.citizensnpcs + citizens + 2.0.21-SNAPSHOT + provided + + + net.aufdemrand + denizen + 1.0.2-SNAPSHOT + provided + + + net.milkbowl.vault + Vault + 1.6.7 + provided + + + com.gmail.nossr50.mcMMO + mcMMO + 1.5.00 + system + ${user.dir}/lib/mcMMO.jar + + + com.herocraftonline.heroes + heroes-stripped + 4dd3dd85 + provided + + + com.codisimus + PhatLoots + 3.8.1 + system + ${user.dir}/lib/PhatLoots.jar + + + com.sk89q + worldedit + LATEST + provided + + + com.sk89q + worldguard + LATEST + provided + + + me.clip + placeholderapi + 2.8.2 + provided + + + ro.nicuch + CitizensBooks + 2.4.7 + system + ${user.dir}/lib/CitizensBooks-2.4.7.jar + + + com.live.bemmamin + GPS + 2.2.2 + system + ${user.dir}/lib/GPSAPI.jar + + + com.github.AlessioDP.Parties + parties-api + 2.4.6 + provided + + + + + clean package install + ${basedir}/src/main/java + + + + . + ${basedir}/src/main/resources/ + true + + lang/**/*.* + config.yml + plugin.yml + events.yml + quests.yml + data.yml + strings.yml + + + + . + ${basedir}/ + false + + README.md + + + + + \ No newline at end of file diff --git a/src/main/java/me/blackvein/quests/CustomObjective.java b/main/src/main/java/me/blackvein/quests/CustomObjective.java similarity index 100% rename from src/main/java/me/blackvein/quests/CustomObjective.java rename to main/src/main/java/me/blackvein/quests/CustomObjective.java diff --git a/src/main/java/me/blackvein/quests/CustomRequirement.java b/main/src/main/java/me/blackvein/quests/CustomRequirement.java similarity index 100% rename from src/main/java/me/blackvein/quests/CustomRequirement.java rename to main/src/main/java/me/blackvein/quests/CustomRequirement.java diff --git a/src/main/java/me/blackvein/quests/CustomReward.java b/main/src/main/java/me/blackvein/quests/CustomReward.java similarity index 100% rename from src/main/java/me/blackvein/quests/CustomReward.java rename to main/src/main/java/me/blackvein/quests/CustomReward.java diff --git a/src/main/java/me/blackvein/quests/DenizenTrigger.java b/main/src/main/java/me/blackvein/quests/DenizenTrigger.java similarity index 100% rename from src/main/java/me/blackvein/quests/DenizenTrigger.java rename to main/src/main/java/me/blackvein/quests/DenizenTrigger.java diff --git a/src/main/java/me/blackvein/quests/Dependencies.java b/main/src/main/java/me/blackvein/quests/Dependencies.java similarity index 100% rename from src/main/java/me/blackvein/quests/Dependencies.java rename to main/src/main/java/me/blackvein/quests/Dependencies.java diff --git a/src/main/java/me/blackvein/quests/Event.java b/main/src/main/java/me/blackvein/quests/Event.java similarity index 100% rename from src/main/java/me/blackvein/quests/Event.java rename to main/src/main/java/me/blackvein/quests/Event.java diff --git a/src/main/java/me/blackvein/quests/EventFactory.java b/main/src/main/java/me/blackvein/quests/EventFactory.java similarity index 100% rename from src/main/java/me/blackvein/quests/EventFactory.java rename to main/src/main/java/me/blackvein/quests/EventFactory.java diff --git a/main/src/main/java/me/blackvein/quests/NpcEffectThread.java b/main/src/main/java/me/blackvein/quests/NpcEffectThread.java new file mode 100644 index 000000000..bd53ec3eb --- /dev/null +++ b/main/src/main/java/me/blackvein/quests/NpcEffectThread.java @@ -0,0 +1,67 @@ +/******************************************************************************************************* + * 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; + +import java.util.List; + +import org.bukkit.Location; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; + +import me.blackvein.quests.particle.ParticleProvider; + +import net.citizensnpcs.api.npc.NPC; + +public class NpcEffectThread implements Runnable { + + final Quests plugin; + + public NpcEffectThread(Quests quests) { + plugin = quests; + } + + @Override + public void run() { + for (Player player : plugin.getServer().getOnlinePlayers()) { + Quester quester = plugin.getQuester(player.getUniqueId()); + List nearby = player.getNearbyEntities(32.0, 32.0, 32.0); + if (nearby.isEmpty() == false) { + for (Entity e : nearby) { + if (plugin.getDependencies().getCitizens() != null) { + if (plugin.getDependencies().getCitizens().getNPCRegistry().isNPC(e)) { + NPC npc = plugin.getDependencies().getCitizens().getNPCRegistry().getNPC(e); + if (plugin.hasQuest(npc, quester)) { + showEffect(player, npc, plugin.getSettings().getEffect()); + } else if (plugin.hasCompletedRedoableQuest(npc, quester)) { + showEffect(player, npc, plugin.getSettings().getRedoEffect()); + } + } + } + } + } + } + } + + /** + * Display a particle effect above an NPC one time + * @param player Target player to let view the effect + * @param npc Target NPC to place the effect above + * @param effectType Value of EnumParticle such as NOTE or SMOKE + */ + public void showEffect(Player player, NPC npc, String effectType) { + Location eyeLoc = npc.getEntity().getLocation(); + eyeLoc.setY(eyeLoc.getY() + 1.5); + ParticleProvider.sendToPlayer(player, eyeLoc, effectType); + } + +} \ No newline at end of file diff --git a/src/main/java/me/blackvein/quests/Planner.java b/main/src/main/java/me/blackvein/quests/Planner.java similarity index 100% rename from src/main/java/me/blackvein/quests/Planner.java rename to main/src/main/java/me/blackvein/quests/Planner.java diff --git a/src/main/java/me/blackvein/quests/Quest.java b/main/src/main/java/me/blackvein/quests/Quest.java similarity index 100% rename from src/main/java/me/blackvein/quests/Quest.java rename to main/src/main/java/me/blackvein/quests/Quest.java diff --git a/src/main/java/me/blackvein/quests/QuestData.java b/main/src/main/java/me/blackvein/quests/QuestData.java similarity index 100% rename from src/main/java/me/blackvein/quests/QuestData.java rename to main/src/main/java/me/blackvein/quests/QuestData.java diff --git a/src/main/java/me/blackvein/quests/QuestFactory.java b/main/src/main/java/me/blackvein/quests/QuestFactory.java similarity index 100% rename from src/main/java/me/blackvein/quests/QuestFactory.java rename to main/src/main/java/me/blackvein/quests/QuestFactory.java diff --git a/src/main/java/me/blackvein/quests/QuestMob.java b/main/src/main/java/me/blackvein/quests/QuestMob.java similarity index 100% rename from src/main/java/me/blackvein/quests/QuestMob.java rename to main/src/main/java/me/blackvein/quests/QuestMob.java diff --git a/src/main/java/me/blackvein/quests/Quester.java b/main/src/main/java/me/blackvein/quests/Quester.java similarity index 100% rename from src/main/java/me/blackvein/quests/Quester.java rename to main/src/main/java/me/blackvein/quests/Quester.java diff --git a/src/main/java/me/blackvein/quests/Quests.java b/main/src/main/java/me/blackvein/quests/Quests.java similarity index 100% rename from src/main/java/me/blackvein/quests/Quests.java rename to main/src/main/java/me/blackvein/quests/Quests.java diff --git a/src/main/java/me/blackvein/quests/Requirements.java b/main/src/main/java/me/blackvein/quests/Requirements.java similarity index 100% rename from src/main/java/me/blackvein/quests/Requirements.java rename to main/src/main/java/me/blackvein/quests/Requirements.java diff --git a/src/main/java/me/blackvein/quests/Rewards.java b/main/src/main/java/me/blackvein/quests/Rewards.java similarity index 100% rename from src/main/java/me/blackvein/quests/Rewards.java rename to main/src/main/java/me/blackvein/quests/Rewards.java diff --git a/src/main/java/me/blackvein/quests/Settings.java b/main/src/main/java/me/blackvein/quests/Settings.java similarity index 100% rename from src/main/java/me/blackvein/quests/Settings.java rename to main/src/main/java/me/blackvein/quests/Settings.java diff --git a/src/main/java/me/blackvein/quests/Stage.java b/main/src/main/java/me/blackvein/quests/Stage.java similarity index 100% rename from src/main/java/me/blackvein/quests/Stage.java rename to main/src/main/java/me/blackvein/quests/Stage.java diff --git a/src/main/java/me/blackvein/quests/exceptions/InvalidStageException.java b/main/src/main/java/me/blackvein/quests/exceptions/InvalidStageException.java similarity index 100% rename from src/main/java/me/blackvein/quests/exceptions/InvalidStageException.java rename to main/src/main/java/me/blackvein/quests/exceptions/InvalidStageException.java diff --git a/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java b/main/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java similarity index 100% rename from src/main/java/me/blackvein/quests/listeners/CmdExecutor.java rename to main/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java diff --git a/src/main/java/me/blackvein/quests/listeners/NpcListener.java b/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java similarity index 100% rename from src/main/java/me/blackvein/quests/listeners/NpcListener.java rename to main/src/main/java/me/blackvein/quests/listeners/NpcListener.java diff --git a/src/main/java/me/blackvein/quests/listeners/PartiesListener.java b/main/src/main/java/me/blackvein/quests/listeners/PartiesListener.java similarity index 100% rename from src/main/java/me/blackvein/quests/listeners/PartiesListener.java rename to main/src/main/java/me/blackvein/quests/listeners/PartiesListener.java diff --git a/src/main/java/me/blackvein/quests/listeners/PlayerListener.java b/main/src/main/java/me/blackvein/quests/listeners/PlayerListener.java similarity index 100% rename from src/main/java/me/blackvein/quests/listeners/PlayerListener.java rename to main/src/main/java/me/blackvein/quests/listeners/PlayerListener.java diff --git a/main/src/main/java/me/blackvein/quests/particle/ParticleProvider.java b/main/src/main/java/me/blackvein/quests/particle/ParticleProvider.java new file mode 100644 index 000000000..9a637ccf2 --- /dev/null +++ b/main/src/main/java/me/blackvein/quests/particle/ParticleProvider.java @@ -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 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); + } + +} \ No newline at end of file diff --git a/main/src/main/java/me/blackvein/quests/particle/ParticleProvider_Bukkit.java b/main/src/main/java/me/blackvein/quests/particle/ParticleProvider_Bukkit.java new file mode 100644 index 000000000..0375147f8 --- /dev/null +++ b/main/src/main/java/me/blackvein/quests/particle/ParticleProvider_Bukkit.java @@ -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 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 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); + } + +} \ No newline at end of file diff --git a/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java b/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java new file mode 100644 index 000000000..3a4f70c16 --- /dev/null +++ b/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java @@ -0,0 +1,103 @@ +/******************************************************************************************************* + * 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 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 FROM_IDENTIFIER = new HashMap<>(); + + 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); + } + +} \ No newline at end of file diff --git a/src/main/java/me/blackvein/quests/prompts/BlocksPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/BlocksPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/BlocksPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/BlocksPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java b/main/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/DateTimePrompt.java b/main/src/main/java/me/blackvein/quests/prompts/DateTimePrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/DateTimePrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/DateTimePrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/ItemStackPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/ItemsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/ItemsPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/ItemsPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/ItemsPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/MobsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/MobsPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/MobsPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/MobsPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/NPCsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/NPCsPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/NPCsPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/NPCsPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/PlannerPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/PlannerPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/PlannerPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/PlannerPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/QuestAcceptPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/RequirementsPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/RewardsPrompt.java diff --git a/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java b/main/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java similarity index 100% rename from src/main/java/me/blackvein/quests/prompts/StagesPrompt.java rename to main/src/main/java/me/blackvein/quests/prompts/StagesPrompt.java diff --git a/src/main/java/me/blackvein/quests/timers/EventTimer.java b/main/src/main/java/me/blackvein/quests/timers/EventTimer.java similarity index 100% rename from src/main/java/me/blackvein/quests/timers/EventTimer.java rename to main/src/main/java/me/blackvein/quests/timers/EventTimer.java diff --git a/src/main/java/me/blackvein/quests/timers/StageTimer.java b/main/src/main/java/me/blackvein/quests/timers/StageTimer.java similarity index 100% rename from src/main/java/me/blackvein/quests/timers/StageTimer.java rename to main/src/main/java/me/blackvein/quests/timers/StageTimer.java diff --git a/src/main/java/me/blackvein/quests/util/CK.java b/main/src/main/java/me/blackvein/quests/util/CK.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/CK.java rename to main/src/main/java/me/blackvein/quests/util/CK.java diff --git a/src/main/java/me/blackvein/quests/util/ItemUtil.java b/main/src/main/java/me/blackvein/quests/util/ItemUtil.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/ItemUtil.java rename to main/src/main/java/me/blackvein/quests/util/ItemUtil.java diff --git a/src/main/java/me/blackvein/quests/util/Lang.java b/main/src/main/java/me/blackvein/quests/util/Lang.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/Lang.java rename to main/src/main/java/me/blackvein/quests/util/Lang.java diff --git a/src/main/java/me/blackvein/quests/util/LocaleQuery.java b/main/src/main/java/me/blackvein/quests/util/LocaleQuery.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/LocaleQuery.java rename to main/src/main/java/me/blackvein/quests/util/LocaleQuery.java diff --git a/src/main/java/me/blackvein/quests/util/MiscUtil.java b/main/src/main/java/me/blackvein/quests/util/MiscUtil.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/MiscUtil.java rename to main/src/main/java/me/blackvein/quests/util/MiscUtil.java diff --git a/src/main/java/me/blackvein/quests/util/RomanNumeral.java b/main/src/main/java/me/blackvein/quests/util/RomanNumeral.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/RomanNumeral.java rename to main/src/main/java/me/blackvein/quests/util/RomanNumeral.java diff --git a/src/main/java/me/blackvein/quests/util/WorldGuardAPI.java b/main/src/main/java/me/blackvein/quests/util/WorldGuardAPI.java similarity index 100% rename from src/main/java/me/blackvein/quests/util/WorldGuardAPI.java rename to main/src/main/java/me/blackvein/quests/util/WorldGuardAPI.java diff --git a/src/main/resources/config.yml b/main/src/main/resources/config.yml similarity index 100% rename from src/main/resources/config.yml rename to main/src/main/resources/config.yml diff --git a/src/main/resources/data.yml b/main/src/main/resources/data.yml similarity index 100% rename from src/main/resources/data.yml rename to main/src/main/resources/data.yml diff --git a/src/main/resources/events.yml b/main/src/main/resources/events.yml similarity index 100% rename from src/main/resources/events.yml rename to main/src/main/resources/events.yml diff --git a/src/main/resources/lang/af-ZA/strings.yml b/main/src/main/resources/lang/af-ZA/strings.yml similarity index 100% rename from src/main/resources/lang/af-ZA/strings.yml rename to main/src/main/resources/lang/af-ZA/strings.yml diff --git a/src/main/resources/lang/ar-SA/strings.yml b/main/src/main/resources/lang/ar-SA/strings.yml similarity index 100% rename from src/main/resources/lang/ar-SA/strings.yml rename to main/src/main/resources/lang/ar-SA/strings.yml diff --git a/src/main/resources/lang/ca-ES/strings.yml b/main/src/main/resources/lang/ca-ES/strings.yml similarity index 100% rename from src/main/resources/lang/ca-ES/strings.yml rename to main/src/main/resources/lang/ca-ES/strings.yml diff --git a/src/main/resources/lang/cs-CZ/strings.yml b/main/src/main/resources/lang/cs-CZ/strings.yml similarity index 100% rename from src/main/resources/lang/cs-CZ/strings.yml rename to main/src/main/resources/lang/cs-CZ/strings.yml diff --git a/src/main/resources/lang/da-DK/strings.yml b/main/src/main/resources/lang/da-DK/strings.yml similarity index 100% rename from src/main/resources/lang/da-DK/strings.yml rename to main/src/main/resources/lang/da-DK/strings.yml diff --git a/src/main/resources/lang/de-DE/strings.yml b/main/src/main/resources/lang/de-DE/strings.yml similarity index 100% rename from src/main/resources/lang/de-DE/strings.yml rename to main/src/main/resources/lang/de-DE/strings.yml diff --git a/src/main/resources/lang/el-GR/strings.yml b/main/src/main/resources/lang/el-GR/strings.yml similarity index 100% rename from src/main/resources/lang/el-GR/strings.yml rename to main/src/main/resources/lang/el-GR/strings.yml diff --git a/src/main/resources/lang/en-PT/strings.yml b/main/src/main/resources/lang/en-PT/strings.yml similarity index 100% rename from src/main/resources/lang/en-PT/strings.yml rename to main/src/main/resources/lang/en-PT/strings.yml diff --git a/src/main/resources/lang/en-US/strings.yml b/main/src/main/resources/lang/en-US/strings.yml similarity index 100% rename from src/main/resources/lang/en-US/strings.yml rename to main/src/main/resources/lang/en-US/strings.yml diff --git a/src/main/resources/lang/es-ES/strings.yml b/main/src/main/resources/lang/es-ES/strings.yml similarity index 100% rename from src/main/resources/lang/es-ES/strings.yml rename to main/src/main/resources/lang/es-ES/strings.yml diff --git a/src/main/resources/lang/es-MX/strings.yml b/main/src/main/resources/lang/es-MX/strings.yml similarity index 100% rename from src/main/resources/lang/es-MX/strings.yml rename to main/src/main/resources/lang/es-MX/strings.yml diff --git a/src/main/resources/lang/et-EE/strings.yml b/main/src/main/resources/lang/et-EE/strings.yml similarity index 100% rename from src/main/resources/lang/et-EE/strings.yml rename to main/src/main/resources/lang/et-EE/strings.yml diff --git a/src/main/resources/lang/fi-FI/strings.yml b/main/src/main/resources/lang/fi-FI/strings.yml similarity index 100% rename from src/main/resources/lang/fi-FI/strings.yml rename to main/src/main/resources/lang/fi-FI/strings.yml diff --git a/src/main/resources/lang/fil-PH/strings.yml b/main/src/main/resources/lang/fil-PH/strings.yml similarity index 100% rename from src/main/resources/lang/fil-PH/strings.yml rename to main/src/main/resources/lang/fil-PH/strings.yml diff --git a/src/main/resources/lang/fr-FR/strings.yml b/main/src/main/resources/lang/fr-FR/strings.yml similarity index 100% rename from src/main/resources/lang/fr-FR/strings.yml rename to main/src/main/resources/lang/fr-FR/strings.yml diff --git a/src/main/resources/lang/he-IL/strings.yml b/main/src/main/resources/lang/he-IL/strings.yml similarity index 100% rename from src/main/resources/lang/he-IL/strings.yml rename to main/src/main/resources/lang/he-IL/strings.yml diff --git a/src/main/resources/lang/hi-IN/strings.yml b/main/src/main/resources/lang/hi-IN/strings.yml similarity index 100% rename from src/main/resources/lang/hi-IN/strings.yml rename to main/src/main/resources/lang/hi-IN/strings.yml diff --git a/src/main/resources/lang/hu-HU/strings.yml b/main/src/main/resources/lang/hu-HU/strings.yml similarity index 100% rename from src/main/resources/lang/hu-HU/strings.yml rename to main/src/main/resources/lang/hu-HU/strings.yml diff --git a/src/main/resources/lang/id-ID/strings.yml b/main/src/main/resources/lang/id-ID/strings.yml similarity index 100% rename from src/main/resources/lang/id-ID/strings.yml rename to main/src/main/resources/lang/id-ID/strings.yml diff --git a/src/main/resources/lang/it-IT/strings.yml b/main/src/main/resources/lang/it-IT/strings.yml similarity index 100% rename from src/main/resources/lang/it-IT/strings.yml rename to main/src/main/resources/lang/it-IT/strings.yml diff --git a/src/main/resources/lang/ja-JP/strings.yml b/main/src/main/resources/lang/ja-JP/strings.yml similarity index 100% rename from src/main/resources/lang/ja-JP/strings.yml rename to main/src/main/resources/lang/ja-JP/strings.yml diff --git a/src/main/resources/lang/ko-KR/strings.yml b/main/src/main/resources/lang/ko-KR/strings.yml similarity index 100% rename from src/main/resources/lang/ko-KR/strings.yml rename to main/src/main/resources/lang/ko-KR/strings.yml diff --git a/src/main/resources/lang/nl-NL/strings.yml b/main/src/main/resources/lang/nl-NL/strings.yml similarity index 100% rename from src/main/resources/lang/nl-NL/strings.yml rename to main/src/main/resources/lang/nl-NL/strings.yml diff --git a/src/main/resources/lang/no-NO/strings.yml b/main/src/main/resources/lang/no-NO/strings.yml similarity index 100% rename from src/main/resources/lang/no-NO/strings.yml rename to main/src/main/resources/lang/no-NO/strings.yml diff --git a/src/main/resources/lang/pl-PL/strings.yml b/main/src/main/resources/lang/pl-PL/strings.yml similarity index 100% rename from src/main/resources/lang/pl-PL/strings.yml rename to main/src/main/resources/lang/pl-PL/strings.yml diff --git a/src/main/resources/lang/pt-BR/strings.yml b/main/src/main/resources/lang/pt-BR/strings.yml similarity index 100% rename from src/main/resources/lang/pt-BR/strings.yml rename to main/src/main/resources/lang/pt-BR/strings.yml diff --git a/src/main/resources/lang/pt-PT/strings.yml b/main/src/main/resources/lang/pt-PT/strings.yml similarity index 100% rename from src/main/resources/lang/pt-PT/strings.yml rename to main/src/main/resources/lang/pt-PT/strings.yml diff --git a/src/main/resources/lang/ro-RO/strings.yml b/main/src/main/resources/lang/ro-RO/strings.yml similarity index 100% rename from src/main/resources/lang/ro-RO/strings.yml rename to main/src/main/resources/lang/ro-RO/strings.yml diff --git a/src/main/resources/lang/ru-RU/strings.yml b/main/src/main/resources/lang/ru-RU/strings.yml similarity index 100% rename from src/main/resources/lang/ru-RU/strings.yml rename to main/src/main/resources/lang/ru-RU/strings.yml diff --git a/src/main/resources/lang/sr-CS/strings.yml b/main/src/main/resources/lang/sr-CS/strings.yml similarity index 100% rename from src/main/resources/lang/sr-CS/strings.yml rename to main/src/main/resources/lang/sr-CS/strings.yml diff --git a/src/main/resources/lang/sr-SP/strings.yml b/main/src/main/resources/lang/sr-SP/strings.yml similarity index 100% rename from src/main/resources/lang/sr-SP/strings.yml rename to main/src/main/resources/lang/sr-SP/strings.yml diff --git a/src/main/resources/lang/sv-SE/strings.yml b/main/src/main/resources/lang/sv-SE/strings.yml similarity index 100% rename from src/main/resources/lang/sv-SE/strings.yml rename to main/src/main/resources/lang/sv-SE/strings.yml diff --git a/src/main/resources/lang/th-TH/strings.yml b/main/src/main/resources/lang/th-TH/strings.yml similarity index 100% rename from src/main/resources/lang/th-TH/strings.yml rename to main/src/main/resources/lang/th-TH/strings.yml diff --git a/src/main/resources/lang/tr-TR/strings.yml b/main/src/main/resources/lang/tr-TR/strings.yml similarity index 100% rename from src/main/resources/lang/tr-TR/strings.yml rename to main/src/main/resources/lang/tr-TR/strings.yml diff --git a/src/main/resources/lang/uk-UA/strings.yml b/main/src/main/resources/lang/uk-UA/strings.yml similarity index 100% rename from src/main/resources/lang/uk-UA/strings.yml rename to main/src/main/resources/lang/uk-UA/strings.yml diff --git a/src/main/resources/lang/vi-VN/strings.yml b/main/src/main/resources/lang/vi-VN/strings.yml similarity index 100% rename from src/main/resources/lang/vi-VN/strings.yml rename to main/src/main/resources/lang/vi-VN/strings.yml diff --git a/src/main/resources/lang/zh-CN/strings.yml b/main/src/main/resources/lang/zh-CN/strings.yml similarity index 100% rename from src/main/resources/lang/zh-CN/strings.yml rename to main/src/main/resources/lang/zh-CN/strings.yml diff --git a/src/main/resources/lang/zh-TW/strings.yml b/main/src/main/resources/lang/zh-TW/strings.yml similarity index 100% rename from src/main/resources/lang/zh-TW/strings.yml rename to main/src/main/resources/lang/zh-TW/strings.yml diff --git a/src/main/resources/plugin.yml b/main/src/main/resources/plugin.yml similarity index 100% rename from src/main/resources/plugin.yml rename to main/src/main/resources/plugin.yml diff --git a/src/main/resources/quests.yml b/main/src/main/resources/quests.yml similarity index 100% rename from src/main/resources/quests.yml rename to main/src/main/resources/quests.yml diff --git a/src/main/resources/strings.yml b/main/src/main/resources/strings.yml similarity index 100% rename from src/main/resources/strings.yml rename to main/src/main/resources/strings.yml diff --git a/pom.xml b/pom.xml index 1d9e4a50d..454439cc8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,10 @@ - + 4.0.0 - + + pom me.blackvein.quests + quests 3.6.4 quests @@ -10,240 +13,34 @@ UTF-8 + 1.8 + 1.8 + 8 + + clean package install + + + + main + v1_8_R1 + v1_8_R2 + v1_8_R3 + dist + - - - spigot-repo - https://hub.spigotmc.org/nexus/content/groups/public/ - - - citizens - http://repo.citizensnpcs.co/ - - - sk89q-repo - http://maven.sk89q.com/repo/ - - - placeholderapi - http://repo.extendedclip.com/content/repositories/placeholderapi/ - - - heroes-stripped - http://nexus.hc.to/content/repositories/pub_releases/ - - - Vault - http://nexus.hc.to/content/repositories/pub_releases/ - - - jitpack.io - https://jitpack.io - - - - org.bukkit - bukkit1132 - 1.13.2-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.13.2.jar - - org.bukkit - bukkit113 - 1.13-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.13.jar - - - org.bukkit - bukkit112 - 1.12-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.12.jar - - - org.bukkit - bukkit111 - 1.11-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.11.jar - - - org.bukkit - bukkit110 - 1.10-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.10.jar - - - org.bukkit - bukkit194 - 1.9.4-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.9.4.jar - - - org.bukkit - bukkit192 - 1.9.2-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.9.2.jar - - - org.bukkit - bukkit186 - 1.8.6-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.8.6.jar - - - org.bukkit - bukkit183 - 1.8.3-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.8.3.jar - - - org.bukkit - bukkit18 - 1.8-R0.1-SNAPSHOT - system - ${project.basedir}/lib/craftbukkit-1.8.jar - - - org.bukkit - bukkit1710 - 1.7.10-R0.1 - system - ${project.basedir}/lib/craftbukkit-1.7.10-R0.1.jar - - - org.bukkit - bukkit179 - 1.7.9-R0.3 - system - ${project.basedir}/lib/craftbukkit-1.7.9-R0.3.jar - - - net.citizensnpcs - citizens - 2.0.21-SNAPSHOT - provided - - - net.aufdemrand - denizen - 1.0.2-SNAPSHOT - provided - - - net.milkbowl.vault - Vault - 1.6.7 - provided - - - com.gmail.nossr50.mcMMO - mcMMO - 1.5.00 - system - ${project.basedir}/lib/mcMMO.jar - - - com.herocraftonline.heroes - heroes-stripped - 4dd3dd85 - provided - - - com.codisimus - PhatLoots + org.apache.commons + commons-lang3 3.8.1 - system - ${project.basedir}/lib/PhatLoots.jar - - - com.sk89q - worldedit - LATEST - provided - - - com.sk89q - worldguard - LATEST - provided - - - me.clip - placeholderapi - 2.8.2 - provided - - - ro.nicuch - CitizensBooks - 2.4.7 - system - ${project.basedir}/lib/CitizensBooks-2.4.7.jar - - - com.live.bemmamin - GPS - 2.2.2 - system - ${project.basedir}/lib/GPSAPI.jar - - - com.github.AlessioDP.Parties - parties-api - 2.4.6 - provided + compile - - - Quests-${project.version} - - - - . - ${basedir}/src/main/resources/ - true - - lang/**/*.* - config.yml - plugin.yml - events.yml - quests.yml - data.yml - strings.yml - - - - . - ${basedir}/ - false - - README.md - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - true - 1.8 - 1.8 - - - - + + + dre-repo + http://erethon.de/repo/ + + \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_10_R1.java b/src/main/java/me/blackvein/particles/Eff_1_10_R1.java deleted file mode 100644 index 555848c59..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_10_R1.java +++ /dev/null @@ -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.particles; - -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_11_R1.java b/src/main/java/me/blackvein/particles/Eff_1_11_R1.java deleted file mode 100644 index b5ecb6d0a..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_11_R1.java +++ /dev/null @@ -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.particles; - -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_12_R1.java b/src/main/java/me/blackvein/particles/Eff_1_12_R1.java deleted file mode 100644 index ce6059178..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_12_R1.java +++ /dev/null @@ -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.particles; - -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_13_R1.java b/src/main/java/me/blackvein/particles/Eff_1_13_R1.java deleted file mode 100644 index 597e83400..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_13_R1.java +++ /dev/null @@ -1,121 +0,0 @@ -package me.blackvein.particles; - -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); - } -} diff --git a/src/main/java/me/blackvein/particles/Eff_1_13_R2.java b/src/main/java/me/blackvein/particles/Eff_1_13_R2.java deleted file mode 100644 index 0f7d277ea..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_13_R2.java +++ /dev/null @@ -1,120 +0,0 @@ -package me.blackvein.particles; - -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); - } -} diff --git a/src/main/java/me/blackvein/particles/Eff_1_7_R3.java b/src/main/java/me/blackvein/particles/Eff_1_7_R3.java deleted file mode 100644 index 35e819247..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_7_R3.java +++ /dev/null @@ -1,110 +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.particles; - -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer; -import org.bukkit.entity.Player; - -import net.minecraft.server.v1_7_R3.PacketPlayOutWorldParticles; - -/** - * This is the Eff_1_7_R3 Enum, it contains all valid effects that players can - * use with the 1.7.9 server version. - * - * @author Blackvein - * @author GregZ_ - * @since 1.9.0 - * @version 3 - */ -public enum Eff_1_7_R3 { - - HUGE_EXPLOSION("hugeexplosion"), - LARGE_EXPLODE("largeexplode"), - FIREWORKS_SPARK("fireworksSpark"), - BUBBLE("bubble"), - SUSPEND("susgpend"), - DEPTH_SUSPEND("depthSuspend"), - TOWN_AURA("townaura"), - CRIT("crit"), - MAGIC_CRIT("magicCrit"), - MOB_SPELL("mobSpell"), - MOB_SPELL_AMBIENT("mobSpellAmbient"), - SPELL("spell"), - INSTANT_SPELL("instantSpell"), - WITCH_MAGIC("witchMagic"), - NOTE("note"), - PORTAL("portal"), - ENCHANTMENT_TABLE("enchantmenttable"), - EXPLODE("explode"), - FLAME("flame"), - LAVA("lava"), - FOOTSTEP("footstep"), - SPLASH("splash"), - LARGE_SMOKE("largesmoke"), - CLOUD("cloud"), - RED_DUST("reddust"), - SNOWBALL_POOF("snowballpoof"), - DRIP_WATER("dripWater"), - DRIP_LAVA("dripLava"), - SNOW_SHOVEL("snowshovel"), - SLIME("slime"), - HEART("heart"), - ANGRY_VILLAGER("angryVillager"), - HAPPY_VILLAGER("happyVillager"), - ICONCRACK("iconcrack_"), - TILECRACK("tilecrack_"); - - /** - * The name of the particle to be sent. - */ - private final String particleName; - - /** - * Create a new instance of the Eff_1_7_R3 enum with the given particle name - * to be sent. - * - * @param particleName - * The name of the particle to be sent to the player in the - * PacketPlayOutWorldParticles packet. - */ - Eff_1_7_R3(String particleName) { - this.particleName = particleName; - } - - /** - * Send the given particle to the player via NMS. - * - * @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. - * @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) throws Exception { - PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleName, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count); - ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet); - } -} diff --git a/src/main/java/me/blackvein/particles/Eff_1_7_R4.java b/src/main/java/me/blackvein/particles/Eff_1_7_R4.java deleted file mode 100644 index 1020b04c6..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_7_R4.java +++ /dev/null @@ -1,110 +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.particles; - -import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; -import org.bukkit.entity.Player; - -import net.minecraft.server.v1_7_R4.PacketPlayOutWorldParticles; - -/** - * This is the Eff_1_7_R4 Enum, it contains all valid effects that players can - * use with the 1.7.10 server version. - * - * @author Blackvein - * @author GregZ_ - * @since 1.9.0 - * @version 3 - */ -public enum Eff_1_7_R4 { - - HUGE_EXPLOSION("hugeexplosion"), - LARGE_EXPLODE("largeexplode"), - FIREWORKS_SPARK("fireworksSpark"), - BUBBLE("bubble"), - SUSPEND("susgpend"), - DEPTH_SUSPEND("depthSuspend"), - TOWN_AURA("townaura"), - CRIT("crit"), - MAGIC_CRIT("magicCrit"), - MOB_SPELL("mobSpell"), - MOB_SPELL_AMBIENT("mobSpellAmbient"), - SPELL("spell"), - INSTANT_SPELL("instantSpell"), - WITCH_MAGIC("witchMagic"), - NOTE("note"), - PORTAL("portal"), - ENCHANTMENT_TABLE("enchantmenttable"), - EXPLODE("explode"), - FLAME("flame"), - LAVA("lava"), - FOOTSTEP("footstep"), - SPLASH("splash"), - LARGE_SMOKE("largesmoke"), - CLOUD("cloud"), - RED_DUST("reddust"), - SNOWBALL_POOF("snowballpoof"), - DRIP_WATER("dripWater"), - DRIP_LAVA("dripLava"), - SNOW_SHOVEL("snowshovel"), - SLIME("slime"), - HEART("heart"), - ANGRY_VILLAGER("angryVillager"), - HAPPY_VILLAGER("happyVillager"), - ICONCRACK("iconcrack_"), - TILECRACK("tilecrack_"); - - /** - * The name of the particle to be sent. - */ - private final String particleName; - - /** - * Create a new instance of the Eff_1_7_R4 enum with the given particle name - * to be sent. - * - * @param particleName - * The name of the particle to be sent to the player in the - * PacketPlayOutWorldParticles packet. - */ - Eff_1_7_R4(String particleName) { - this.particleName = particleName; - } - - /** - * Send the given particle to the player via NMS. - * - * @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. - * @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) throws Exception { - PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleName, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count); - ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet); - } -} diff --git a/src/main/java/me/blackvein/particles/Eff_1_9_R1.java b/src/main/java/me/blackvein/particles/Eff_1_9_R1.java deleted file mode 100644 index 47e1333fc..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_9_R1.java +++ /dev/null @@ -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.particles; - -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_9_R2.java b/src/main/java/me/blackvein/particles/Eff_1_9_R2.java deleted file mode 100644 index 6d57b36df..000000000 --- a/src/main/java/me/blackvein/particles/Eff_1_9_R2.java +++ /dev/null @@ -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.particles; - -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/blackvein/quests/NpcEffectThread.java b/src/main/java/me/blackvein/quests/NpcEffectThread.java deleted file mode 100644 index 2571276c4..000000000 --- a/src/main/java/me/blackvein/quests/NpcEffectThread.java +++ /dev/null @@ -1,1202 +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; - -import java.util.List; - -import org.bukkit.Location; -import org.bukkit.entity.Entity; -import org.bukkit.entity.Player; - -import me.blackvein.particles.Eff_1_10_R1; -import me.blackvein.particles.Eff_1_11_R1; -import me.blackvein.particles.Eff_1_12_R1; -import me.blackvein.particles.Eff_1_13_R1; -import me.blackvein.particles.Eff_1_13_R2; -import me.blackvein.particles.Eff_1_7_R3; -import me.blackvein.particles.Eff_1_7_R4; -import me.blackvein.particles.Eff_1_8_R1; -import me.blackvein.particles.Eff_1_8_R2; -import me.blackvein.particles.Eff_1_8_R3; -import me.blackvein.particles.Eff_1_9_R1; -import me.blackvein.particles.Eff_1_9_R2; -import net.citizensnpcs.api.npc.NPC; - -public class NpcEffectThread implements Runnable { - - final Quests plugin; - - public NpcEffectThread(Quests quests) { - plugin = quests; - } - - @Override - public void run() { - for (Player player : plugin.getServer().getOnlinePlayers()) { - Quester quester = plugin.getQuester(player.getUniqueId()); - List nearby = player.getNearbyEntities(32.0, 32.0, 32.0); - if (nearby.isEmpty() == false) { - for (Entity e : nearby) { - if (plugin.getDependencies().getCitizens() != null) { - if (plugin.getDependencies().getCitizens().getNPCRegistry().isNPC(e)) { - NPC npc = plugin.getDependencies().getCitizens().getNPCRegistry().getNPC(e); - if (plugin.hasQuest(npc, quester)) { - showEffect(player, npc, plugin.getSettings().getEffect()); - } else if (plugin.hasCompletedRedoableQuest(npc, quester)) { - showEffect(player, npc, plugin.getSettings().getRedoEffect()); - } - } - } - } - } - } - } - - /** - * Display a particle effect above an NPC one time - * @param player Target player to let view the effect - * @param npc Target NPC to place the effect above - * @param effectType Value of EnumParticle such as NOTE or SMOKE - */ - 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); - } else if (plugin.getDetectedBukkitVersion().contains("1.7.10")) { - showEffect_R4(player, npc, effectType); - } else if (plugin.getDetectedBukkitVersion().contains("1.7.9")) { - showEffect_R3(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!"); - } - } - } - - 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!"); - } - } - } - - private void showEffect_R4(Player player, NPC npc, String effectType) { - Location eyeLoc = npc.getEntity().getLocation(); - eyeLoc.setY(eyeLoc.getY() + 1.5); - if (effectType.equalsIgnoreCase("enchant")) { - try { - Eff_1_7_R4.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("crit")) { - try { - Eff_1_7_R4.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("spell")) { - try { - Eff_1_7_R4.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("magiccrit")) { - try { - Eff_1_7_R4.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("mobspell")) { - try { - Eff_1_7_R4.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } 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_7_R4.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("portal")) { - try { - Eff_1_7_R4.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5); - } 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_7_R4.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("witch")) { - try { - Eff_1_7_R4.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } 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_7_R4.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3); - } 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_7_R4.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("smoke")) { - try { - Eff_1_7_R4.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20); - } catch (Exception e) { - e.printStackTrace(); - } - } else { - try { - Eff_1_7_R4.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } catch (Exception e) { - plugin.getLogger().info(effectType + " is not a valid effect name!"); - } - } - } - - private void showEffect_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_7_R3.ENCHANTMENT_TABLE.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 10); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("crit")) { - try { - Eff_1_7_R3.CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("spell")) { - try { - Eff_1_7_R3.INSTANT_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("magiccrit")) { - try { - Eff_1_7_R3.MAGIC_CRIT.sendToPlayer(player, eyeLoc, 0, 0, 0, (float) 0.35, 3); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("mobspell")) { - try { - Eff_1_7_R3.MOB_SPELL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } 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_7_R3.NOTE.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("portal")) { - try { - Eff_1_7_R3.PORTAL.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 5); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("dust")) { - try { - Location old = eyeLoc; - Location newLoc = new Location(player.getWorld(), old.getX(), old.getY() + (float) 0.5, old.getZ()); - Eff_1_7_R3.RED_DUST.sendToPlayer(player, newLoc, 0, 0, 0, 1, 1); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("witch")) { - try { - Eff_1_7_R3.WITCH_MAGIC.sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } 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_7_R3.SNOWBALL_POOF.sendToPlayer(player, newLoc, 0, 0, 0, 1, 3); - } 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_7_R3.SPLASH.sendToPlayer(player, newLoc, 0, 0, 0, 1, 4); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (effectType.equalsIgnoreCase("smoke")) { - try { - Eff_1_7_R3.TOWN_AURA.sendToPlayer(player, eyeLoc, 0, 1, 0, 1, 20); - } catch (Exception e) { - e.printStackTrace(); - } - } else { - try { - Eff_1_7_R3.valueOf(effectType.toUpperCase()).sendToPlayer(player, eyeLoc, 0, 0, 0, 1, 3); - } catch (Exception e) { - plugin.getLogger().info(effectType + " is not a valid effect name!"); - } - } - } -} diff --git a/src/main/javadoc/me/blackvein/particles/package-info.java b/src/main/javadoc/me/blackvein/particles/package-info.java deleted file mode 100644 index 387432aa3..000000000 --- a/src/main/javadoc/me/blackvein/particles/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Store the particle effect enums, these are used to support multiple versions - * of NMS. - */ -package me.blackvein.particles; \ No newline at end of file diff --git a/src/main/javadoc/me/blackvein/quests/exceptions/package-info.java b/src/main/javadoc/me/blackvein/quests/exceptions/package-info.java deleted file mode 100644 index 766a9c599..000000000 --- a/src/main/javadoc/me/blackvein/quests/exceptions/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Contains all the custom classes extending exception that are used within the - * Quests plugin. - */ -package me.blackvein.quests.exceptions; \ No newline at end of file diff --git a/v1_8_R1/pom.xml b/v1_8_R1/pom.xml new file mode 100644 index 000000000..333897d37 --- /dev/null +++ b/v1_8_R1/pom.xml @@ -0,0 +1,66 @@ + + 4.0.0 + quests-v1_8_R1 + + me.blackvein.quests + quests-parent + 3.6.0 + + + + UTF-8 + + + + + org.bukkit + craftbukkit + 1.8-R0.1-SNAPSHOT + provided + + + me.blackvein.quests + quests-main + ${project.parent.version} + compile + + + + + clean package install + ${basedir}/src/main/java + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.2 + + + + org.apache.maven.plugins + maven-shade-plugin + 2.1 + + + package + + shade + + + + + + + \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_8_R1.java b/v1_8_R1/src/main/java/me/blackvein/quests/nms/v1_8_R1/particle/Eff_1_8_R1.java similarity index 96% rename from src/main/java/me/blackvein/particles/Eff_1_8_R1.java rename to v1_8_R1/src/main/java/me/blackvein/quests/nms/v1_8_R1/particle/Eff_1_8_R1.java index c493d63d6..92967e36b 100644 --- a/src/main/java/me/blackvein/particles/Eff_1_8_R1.java +++ b/v1_8_R1/src/main/java/me/blackvein/quests/nms/v1_8_R1/particle/Eff_1_8_R1.java @@ -10,7 +10,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************************************/ -package me.blackvein.particles; +package me.blackvein.quests.nms.v1_8_R1.particle; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer; diff --git a/v1_8_R2/pom.xml b/v1_8_R2/pom.xml new file mode 100644 index 000000000..f2751ebea --- /dev/null +++ b/v1_8_R2/pom.xml @@ -0,0 +1,66 @@ + + 4.0.0 + quests-v1_8_R2 + + me.blackvein.quests + quests-parent + 3.6.0 + + + + UTF-8 + + + + + org.bukkit + craftbukkit + 1.8.3-R0.1-SNAPSHOT + provided + + + me.blackvein.quests + quests-main + ${project.parent.version} + compile + + + + + clean package install + ${basedir}/src/main/java + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.2 + + + + org.apache.maven.plugins + maven-shade-plugin + 2.1 + + + package + + shade + + + + + + + \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_8_R2.java b/v1_8_R2/src/main/java/me/blackvein/quests/nms/v1_8_R2/particle/Eff_1_8_R2.java similarity index 96% rename from src/main/java/me/blackvein/particles/Eff_1_8_R2.java rename to v1_8_R2/src/main/java/me/blackvein/quests/nms/v1_8_R2/particle/Eff_1_8_R2.java index da078998e..59e427eab 100644 --- a/src/main/java/me/blackvein/particles/Eff_1_8_R2.java +++ b/v1_8_R2/src/main/java/me/blackvein/quests/nms/v1_8_R2/particle/Eff_1_8_R2.java @@ -10,7 +10,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************************************/ -package me.blackvein.particles; +package me.blackvein.quests.nms.v1_8_R2.particle; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer; diff --git a/v1_8_R3/pom.xml b/v1_8_R3/pom.xml new file mode 100644 index 000000000..aef06126b --- /dev/null +++ b/v1_8_R3/pom.xml @@ -0,0 +1,66 @@ + + 4.0.0 + quests-v1_8_R3 + + me.blackvein.quests + quests-parent + 3.6.0 + + + + UTF-8 + + + + + org.bukkit + craftbukkit + 1.8.8-R0.1-SNAPSHOT + provided + + + me.blackvein.quests + quests-main + ${project.parent.version} + compile + + + + + clean package install + ${basedir}/src/main/java + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.2 + + + + org.apache.maven.plugins + maven-shade-plugin + 2.1 + + + package + + shade + + + + + + + \ No newline at end of file diff --git a/src/main/java/me/blackvein/particles/Eff_1_8_R3.java b/v1_8_R3/src/main/java/me/blackvein/quests/nms/v1_8_R3/particle/Eff_1_8_R3.java similarity index 96% rename from src/main/java/me/blackvein/particles/Eff_1_8_R3.java rename to v1_8_R3/src/main/java/me/blackvein/quests/nms/v1_8_R3/particle/Eff_1_8_R3.java index ae06e689e..1075f2de3 100644 --- a/src/main/java/me/blackvein/particles/Eff_1_8_R3.java +++ b/v1_8_R3/src/main/java/me/blackvein/quests/nms/v1_8_R3/particle/Eff_1_8_R3.java @@ -10,7 +10,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************************************/ -package me.blackvein.particles; +package me.blackvein.quests.nms.v1_8_R3.particle; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;