Quests - V2.8.6-02 - Code reformat - By GregZ_

* Incremented dev version in pom.xml.
     * Added javadoc comments to all files in the me.blackvein.particles package.
     * Added javadoc source folder, this will eventually contain all of the package-info files as well as any javadoc resources and overview pages.
This commit is contained in:
GregZ_ 2017-06-23 16:48:11 +01:00
parent 82eca3991a
commit 051ad5cfe4
12 changed files with 465 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>2.8.6-01</version>
<version>2.8.6-02</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>

View File

@ -7,6 +7,15 @@ 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),
@ -57,12 +66,50 @@ public enum Eff_1_10_R1 {
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),
FALLING_DUST(EnumParticle.FALLING_DUST);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_10_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_10_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

View File

@ -7,6 +7,15 @@ 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),
@ -59,12 +68,50 @@ public enum Eff_1_11_R1 {
SPIT(EnumParticle.SPIT),
TOTEM(EnumParticle.TOTEM);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_11_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_11_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

View File

@ -7,6 +7,15 @@ 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),
@ -59,12 +68,50 @@ public enum Eff_1_12_R1 {
SPIT(EnumParticle.SPIT),
TOTEM(EnumParticle.TOTEM);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_12_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_12_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

View File

@ -6,6 +6,15 @@ 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"),
@ -44,12 +53,44 @@ public enum Eff_1_7_R3 {
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);

View File

@ -6,6 +6,15 @@ 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"),
@ -44,12 +53,44 @@ public enum Eff_1_7_R4 {
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);

View File

@ -7,6 +7,15 @@ import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R1.EnumParticle;
import net.minecraft.server.v1_8_R1.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_8_R1 Enum, it contains all valid effects that players can
* use with the 1.8 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.0.0
* @version 3
*/
public enum Eff_1_8_R1 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
@ -52,12 +61,50 @@ public enum Eff_1_8_R1 {
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_8_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_8_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

View File

@ -7,6 +7,15 @@ import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.EnumParticle;
import net.minecraft.server.v1_8_R2.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_8_R2 Enum, it contains all valid effects that players can
* use with the 1.8.3 server version.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.3.1
* @version 3
*/
public enum Eff_1_8_R2 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
@ -52,12 +61,50 @@ public enum Eff_1_8_R2 {
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_8_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_8_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);

View File

@ -7,6 +7,15 @@ import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R3.EnumParticle;
import net.minecraft.server.v1_8_R3.PacketPlayOutWorldParticles;
/**
* This is the Eff_1_8_R3 Enum, it contains all valid effects that players can
* use with the 1.8.4 - 1.8.8 server versions.
*
* @author FlyingPikachu
* @author GregZ_
* @since 2.5.0
* @version 4
*/
public enum Eff_1_8_R3 {
EXPLOSION(EnumParticle.EXPLOSION_NORMAL),
@ -52,12 +61,50 @@ public enum Eff_1_8_R3 {
TAKE(EnumParticle.ITEM_TAKE),
MOB_APPEARANCE(EnumParticle.MOB_APPEARANCE);
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_8_R3 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_8_R3(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

View File

@ -7,6 +7,16 @@ 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),
@ -56,12 +66,50 @@ public enum Eff_1_9_R1 {
ENDROD(EnumParticle.END_ROD),
DAMAGE_INDICATOR(EnumParticle.DAMAGE_INDICATOR),;
/**
* The NMS EnumParticle to be sent to the player.
*/
private final EnumParticle particleEnum;
/**
* Create a new instance of the Eff_1_9_R1 enum with the given particle type
* to be sent.
*
* @param particleEnum
* The particle type to be sent to the player in the
* PacketPlayOutWorldParticles packet.
*/
Eff_1_9_R1(EnumParticle particleEnum) {
this.particleEnum = particleEnum;
}
/**
* Send the given particle to the player via NMS. It should be noted that
* all particles have the range limit set to 256 due to the second variable
* in the packet constructor being false.
*
* @param player
* The player to send the particle to.
* @param location
* The location to play the particle at.
* @param offsetX
* The offset of the particle in the X direction.
* @param offsetY
* The offset of the particle in the Y direction.
* @param offsetZ
* The offset of the particle in the Z direction.
* @param speed
* The speed that the particle effect will be played at.
* @param count
* The number of particles to send to the player.
* @param data
* An integer array needed for some particles, this is used for
* packets such as block crack or particle colour on redstone /
* firework particles.
* @throws Exception
* A ReportedException may be thrown if the network manager
* fails to handle the packet.
*/
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] data) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(particleEnum, false, (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, count, data);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);

View File

@ -7,6 +7,15 @@ 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),
@ -56,12 +65,50 @@ public enum Eff_1_9_R2 {
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);

View File

@ -0,0 +1,5 @@
/**
* Store the particle effect enums, these are used to support multiple versions
* of NMS.
*/
package me.blackvein.particles;