remove movement and packet handlers for now

This commit is contained in:
curtis 2023-05-02 22:40:24 +02:00
parent 653e49bcb8
commit af8b608c15
5 changed files with 19 additions and 70 deletions

19
pom.xml
View File

@ -34,6 +34,7 @@
<groupId>com.github.azbh111</groupId> <groupId>com.github.azbh111</groupId>
<artifactId>craftbukkit-1.8.8</artifactId> <artifactId>craftbukkit-1.8.8</artifactId>
<version>R</version> <version>R</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
@ -43,4 +44,22 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -1,6 +1,5 @@
package lol.vera.spigot; package lol.vera.spigot;
import lol.vera.spigot.implementation.PacketHandlerImplementation;
import lol.vera.spigot.implementation.KnockbackImplementation; import lol.vera.spigot.implementation.KnockbackImplementation;
import lombok.Data; import lombok.Data;
@ -12,8 +11,4 @@ public class VeraSpigotAPI {
private KnockbackImplementation knockback private KnockbackImplementation knockback
= new KnockbackImplementation.DEFAULT(); = new KnockbackImplementation.DEFAULT();
private PacketHandlerImplementation packetHandler
= new PacketHandlerImplementation.DEFAULT();
} }

View File

@ -1,17 +0,0 @@
package lol.vera.spigot.handler;
import net.minecraft.server.v1_8_R3.PacketPlayInFlying;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public interface IMovementHandler {
/**
* @param player The {@link Player} who has moved
* @param to The {@link Location} the player came from
* @param from The {@link Location} the player is going to
* @param packet The {@link PacketPlayInFlying} flying packet
*/
void handleMove(Player player, Location to, Location from, PacketPlayInFlying packet);
}

View File

@ -1,20 +0,0 @@
package lol.vera.spigot.handler;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PlayerConnection;
public interface IPacketHandler {
/**
* @param connection The player who we are sending the packet to
* @param packet The {@link Packet} which has been sent
*/
void handleSent(PlayerConnection connection, Packet<?> packet);
/**
* @param connection The player who receives the packet
* @param packet The {@link Packet} which has been received
*/
void handleReceived(PlayerConnection connection, Packet<?> packet);
}

View File

@ -1,28 +0,0 @@
package lol.vera.spigot.implementation;
import lol.vera.spigot.handler.IMovementHandler;
import lol.vera.spigot.handler.IPacketHandler;
import org.bukkit.plugin.java.JavaPlugin;
public interface PacketHandlerImplementation {
void registerMovementHandlers(JavaPlugin plugin, IMovementHandler... movementHandlers);
void registerPacketHandlers(JavaPlugin plugin, IPacketHandler... packetHandlers);
class DEFAULT implements PacketHandlerImplementation {
@Override
public void registerMovementHandlers(JavaPlugin plugin, IMovementHandler... movementHandlers) {
}
@Override
public void registerPacketHandlers(JavaPlugin plugin, IPacketHandler... packetHandlers) {
}
}
}