Sorry Spigot!

This commit is contained in:
HappyPikachu 2015-01-05 23:19:40 -05:00
parent 2f70d59039
commit ef84a325a6
5 changed files with 71 additions and 2 deletions

BIN
lib/craftbukkit-1.8.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,8 +23,8 @@
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
</dependency>
<dependency>

View File

@ -0,0 +1,69 @@
package me.blackvein.particles;
import me.blackvein.quests.util.ReflectionUtil;
import net.minecraft.server.v1_8_R1.PacketPlayOutWorldParticles;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_8_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
public enum Eff_1_8_R1 {
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_");
private final String particleName;
Eff_1_8_R1(String particleName) {
this.particleName = particleName;
}
public void sendToPlayer(Player player, Location location, float offsetX, float offsetY, float offsetZ, float speed, int count, int[] unknown) throws Exception {
PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles();
ReflectionUtil.setValue(packet, "a", particleName);
ReflectionUtil.setValue(packet, "b", (float) location.getX());
ReflectionUtil.setValue(packet, "c", (float) location.getY());
ReflectionUtil.setValue(packet, "d", (float) location.getZ());
ReflectionUtil.setValue(packet, "e", offsetX);
ReflectionUtil.setValue(packet, "f", offsetY);
ReflectionUtil.setValue(packet, "g", offsetZ);
ReflectionUtil.setValue(packet, "h", speed);
ReflectionUtil.setValue(packet, "i", count);
ReflectionUtil.setValue(packet, "k", unknown);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}