diff --git a/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientStructureBlock.java b/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientStructureBlock.java index 68eb80272..bc660f276 100644 --- a/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientStructureBlock.java +++ b/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientStructureBlock.java @@ -20,7 +20,6 @@ package com.comphenix.packetwrapper; import com.comphenix.protocol.PacketType; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.wrappers.BlockPosition; public class WrapperPlayClientStructureBlock extends AbstractPacket { diff --git a/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientTabComplete.java b/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientTabComplete.java index 171578623..ebb0f29e8 100644 --- a/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientTabComplete.java +++ b/src/main/java/com/comphenix/packetwrapper/WrapperPlayClientTabComplete.java @@ -20,8 +20,6 @@ package com.comphenix.packetwrapper; import com.comphenix.protocol.PacketType; import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.wrappers.BlockPosition; -import com.mojang.brigadier.suggestion.Suggestions; public class WrapperPlayClientTabComplete extends AbstractPacket { public static final PacketType TYPE = PacketType.Play.Client.TAB_COMPLETE; diff --git a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerCommands.java b/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerCommands.java index 317cb0767..96d1cf6d0 100644 --- a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerCommands.java +++ b/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerCommands.java @@ -39,11 +39,11 @@ public class WrapperPlayServerCommands extends AbstractPacket { * Mojang's brigadier library isn't versioned inside craftbukkit, * so it should be safe to use here. */ - public RootCommandNode getRoot() { - return (RootCommandNode) handle.getModifier().read(0); + public RootCommandNode getRoot() { + return (RootCommandNode) handle.getModifier().read(0); } - public void setRoot(RootCommandNode node) { + public void setRoot(RootCommandNode node) { handle.getModifier().write(0, node); } } diff --git a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerMapChunk.java b/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerMapChunk.java index 091ba8659..4912a7cd8 100644 --- a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerMapChunk.java +++ b/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerMapChunk.java @@ -23,7 +23,6 @@ import java.util.List; import com.comphenix.protocol.PacketType; import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.wrappers.nbt.NbtBase; -import com.comphenix.protocol.wrappers.nbt.NbtCompound; public class WrapperPlayServerMapChunk extends AbstractPacket { public static final PacketType TYPE = PacketType.Play.Server.MAP_CHUNK; diff --git a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerWorldParticles-DESKTOP-9AN38QR.java b/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerWorldParticles-DESKTOP-9AN38QR.java deleted file mode 100644 index 3232c8bbb..000000000 --- a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerWorldParticles-DESKTOP-9AN38QR.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * PacketWrapper - ProtocolLib wrappers for Minecraft packets - * Copyright (C) dmulloy2 - * Copyright (C) Kristian S. Strangeland - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.comphenix.packetwrapper; - -import com.comphenix.protocol.PacketType; -import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.wrappers.WrappedParticle; - -public class WrapperPlayServerWorldParticles extends AbstractPacket { - public static final PacketType TYPE = - PacketType.Play.Server.WORLD_PARTICLES; - - public WrapperPlayServerWorldParticles() { - super(new PacketContainer(TYPE), TYPE); - handle.getModifier().writeDefaults(); - } - - public WrapperPlayServerWorldParticles(PacketContainer packet) { - super(packet, TYPE); - } - - /** - * Retrieve the particle. - * - * @return The current particle - */ - public WrappedParticle getParticle() { - return handle.getNewParticles().read(0); - } - - /** - * Set the particle. - * - * @param value - new value. - */ - public void setParticleType(WrappedParticle value) { - handle.getNewParticles().write(0, value); - } - - /** - * Retrieve X. - *

- * Notes: x position of the particle - * - * @return The current X - */ - public float getX() { - return handle.getFloat().read(0); - } - - /** - * Set X. - * - * @param value - new value. - */ - public void setX(float value) { - handle.getFloat().write(0, value); - } - - /** - * Retrieve Y. - *

- * Notes: y position of the particle - * - * @return The current Y - */ - public float getY() { - return handle.getFloat().read(1); - } - - /** - * Set Y. - * - * @param value - new value. - */ - public void setY(float value) { - handle.getFloat().write(1, value); - } - - /** - * Retrieve Z. - *

- * Notes: z position of the particle - * - * @return The current Z - */ - public float getZ() { - return handle.getFloat().read(2); - } - - /** - * Set Z. - * - * @param value - new value. - */ - public void setZ(float value) { - handle.getFloat().write(2, value); - } - - /** - * Retrieve Offset X. - *

- * Notes: this is added to the X position after being multiplied by - * random.nextGaussian() - * - * @return The current Offset X - */ - public float getOffsetX() { - return handle.getFloat().read(3); - } - - /** - * Set Offset X. - * - * @param value - new value. - */ - public void setOffsetX(float value) { - handle.getFloat().write(3, value); - } - - /** - * Retrieve Offset Y. - *

- * Notes: this is added to the Y position after being multiplied by - * random.nextGaussian() - * - * @return The current Offset Y - */ - public float getOffsetY() { - return handle.getFloat().read(4); - } - - /** - * Set Offset Y. - * - * @param value - new value. - */ - public void setOffsetY(float value) { - handle.getFloat().write(4, value); - } - - /** - * Retrieve Offset Z. - *

- * Notes: this is added to the Z position after being multiplied by - * random.nextGaussian() - * - * @return The current Offset Z - */ - public float getOffsetZ() { - return handle.getFloat().read(5); - } - - /** - * Set Offset Z. - * - * @param value - new value. - */ - public void setOffsetZ(float value) { - handle.getFloat().write(5, value); - } - - /** - * Retrieve Particle data. - *

- * Notes: the data of each particle - * - * @return The current Particle data - */ - public float getParticleData() { - return handle.getFloat().read(6); - } - - /** - * Set Particle data. - * - * @param value - new value. - */ - public void setParticleData(float value) { - handle.getFloat().write(6, value); - } - - /** - * Retrieve Number of particles. - *

- * Notes: the number of particles to create - * - * @return The current Number of particles - */ - public int getNumberOfParticles() { - return handle.getIntegers().read(0); - } - - /** - * Set Number of particles. - * - * @param value - new value. - */ - public void setNumberOfParticles(int value) { - handle.getIntegers().write(0, value); - } - - /** - * Retrieve Long Distance. - *

- * Notes: if true, particle distance increases from 256 to 65536. - * - * @return The current Long Distance - */ - public boolean getLongDistance() { - return handle.getBooleans().read(0); - } - - /** - * Set Long Distance. - * - * @param value - new value. - */ - public void setLongDistance(boolean value) { - handle.getBooleans().write(0, value); - } -} diff --git a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerWorldParticles.java b/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerWorldParticles.java deleted file mode 100644 index 4cd69b85e..000000000 --- a/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerWorldParticles.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * PacketWrapper - ProtocolLib wrappers for Minecraft packets - * Copyright (C) dmulloy2 - * Copyright (C) Kristian S. Strangeland - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.comphenix.packetwrapper; - -import com.comphenix.protocol.PacketType; -import com.comphenix.protocol.events.PacketContainer; -import com.comphenix.protocol.wrappers.WrappedParticle; - -public class WrapperPlayServerWorldParticles extends AbstractPacket { - public static final PacketType TYPE = - PacketType.Play.Server.WORLD_PARTICLES; - - public WrapperPlayServerWorldParticles() { - super(new PacketContainer(TYPE), TYPE); - handle.getModifier().writeDefaults(); - } - - public WrapperPlayServerWorldParticles(PacketContainer packet) { - super(packet, TYPE); - } - - /** - * Retrieve the particle. - * - * @return The current particle - */ - public WrappedParticle getParticle() { - return handle.getNewParticles().read(0); - } - - /** - * Set the particle. - * - * @param value - new value. - */ - public void setParticleType(WrappedParticle value) { - handle.getNewParticles().write(0, value); - } - - /** - * Retrieve X. - *

- * Notes: x position of the particle - * - * @return The current X - */ - public float getX() { - return handle.getFloat().read(0); - } - - /** - * Set X. - * - * @param value - new value. - */ - public void setX(float value) { - handle.getFloat().write(0, value); - } - - /** - * Retrieve Y. - *

- * Notes: y position of the particle - * - * @return The current Y - */ - public float getY() { - return handle.getFloat().read(1); - } - - /** - * Set Y. - * - * @param value - new value. - */ - public void setY(float value) { - handle.getFloat().write(1, value); - } - - /** - * Retrieve Z. - *

- * Notes: z position of the particle - * - * @return The current Z - */ - public float getZ() { - return handle.getFloat().read(2); - } - - /** - * Set Z. - * - * @param value - new value. - */ - public void setZ(float value) { - handle.getFloat().write(2, value); - } - - /** - * Retrieve Offset X. - *

- * Notes: this is added to the X position after being multiplied by - * random.nextGaussian() - * - * @return The current Offset X - */ - public float getOffsetX() { - return handle.getFloat().read(3); - } - - /** - * Set Offset X. - * - * @param value - new value. - */ - public void setOffsetX(float value) { - handle.getFloat().write(3, value); - } - - /** - * Retrieve Offset Y. - *

- * Notes: this is added to the Y position after being multiplied by - * random.nextGaussian() - * - * @return The current Offset Y - */ - public float getOffsetY() { - return handle.getFloat().read(4); - } - - /** - * Set Offset Y. - * - * @param value - new value. - */ - public void setOffsetY(float value) { - handle.getFloat().write(4, value); - } - - /** - * Retrieve Offset Z. - *

- * Notes: this is added to the Z position after being multiplied by - * random.nextGaussian() - * - * @return The current Offset Z - */ - public float getOffsetZ() { - return handle.getFloat().read(5); - } - - /** - * Set Offset Z. - * - * @param value - new value. - */ - public void setOffsetZ(float value) { - handle.getFloat().write(5, value); - } - - /** - * Retrieve Particle data. - *

- * Notes: the data of each particle - * - * @return The current Particle data - */ - public float getParticleData() { - return handle.getFloat().read(6); - } - - /** - * Set Particle data. - * - * @param value - new value. - */ - public void setParticleData(float value) { - handle.getFloat().write(6, value); - } - - /** - * Retrieve Number of particles. - *

- * Notes: the number of particles to create - * - * @return The current Number of particles - */ - public int getNumberOfParticles() { - return handle.getIntegers().read(0); - } - - /** - * Set Number of particles. - * - * @param value - new value. - */ - public void setNumberOfParticles(int value) { - handle.getIntegers().write(0, value); - } - - /** - * Retrieve Long Distance. - *

- * Notes: if true, particle distance increases from 256 to 65536. - * - * @return The current Long Distance - */ - public boolean getLongDistance() { - return handle.getBooleans().read(0); - } - - /** - * Set Long Distance. - * - * @param value - new value. - */ - public void setLongDistance(boolean value) { - handle.getBooleans().write(0, value); - } -}