feat: disabled the respawn packet
This commit is contained in:
parent
d804fb1207
commit
fe33a003ea
3 changed files with 12 additions and 6 deletions
|
@ -38,12 +38,12 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT")
|
||||||
compileOnly("com.github.dmulloy2:ProtocolLib:-SNAPSHOT")
|
compileOnly("com.github.dmulloy2:ProtocolLib:5.3.0")
|
||||||
compileOnly("me.clip:placeholderapi:2.11.5")
|
compileOnly("me.clip:placeholderapi:2.11.5")
|
||||||
compileOnly("net.kyori:adventure-api:4.17.0")
|
compileOnly("net.kyori:adventure-api:4.17.0")
|
||||||
|
|
||||||
implementation("xyz.xenondevs.invui:invui:1.36")
|
implementation("xyz.xenondevs.invui:invui:1.39")
|
||||||
implementation("net.wesjd:anvilgui:1.10.2-SNAPSHOT")
|
implementation("net.wesjd:anvilgui:1.10.2-SNAPSHOT")
|
||||||
implementation("com.github.jsixface:yamlconfig:1.2")
|
implementation("com.github.jsixface:yamlconfig:1.2")
|
||||||
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
|
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
|
||||||
|
@ -54,7 +54,7 @@ dependencies {
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
implementation("org.bstats:bstats-bukkit:3.0.2")
|
implementation("org.bstats:bstats-bukkit:3.0.2")
|
||||||
|
|
||||||
testImplementation("com.github.MockBukkit:MockBukkit:v3.99.1")
|
testImplementation("com.github.MockBukkit:MockBukkit:v3.133.2")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.2")
|
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.2")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||||
|
|
|
@ -144,13 +144,15 @@ public class AppearanceManager {
|
||||||
final boolean wasFlying = player.isFlying();
|
final boolean wasFlying = player.isFlying();
|
||||||
final boolean wasAllowedToFly = player.getAllowFlight();
|
final boolean wasAllowedToFly = player.getAllowFlight();
|
||||||
final int foodLevel = player.getFoodLevel();
|
final int foodLevel = player.getFoodLevel();
|
||||||
|
|
||||||
final WrapperPlayServerRespawn respawn = new WrapperPlayServerRespawn();
|
final WrapperPlayServerRespawn respawn = new WrapperPlayServerRespawn();
|
||||||
respawn.setDimension(world);
|
//respawn.setDimension(world);
|
||||||
respawn.setSeed(world.getSeed());
|
respawn.setSeed(world.getSeed());
|
||||||
respawn.setGameMode(player.getGameMode());
|
respawn.setGameMode(player.getGameMode());
|
||||||
respawn.setPreviousGameMode(player.getGameMode());
|
respawn.setPreviousGameMode(player.getGameMode());
|
||||||
respawn.setCopyMetadata(true);
|
respawn.setCopyMetadata(true);
|
||||||
respawn.sendPacket(player);
|
//respawn.sendPacket(player);
|
||||||
|
|
||||||
player.teleport(player.getLocation(), PlayerTeleportEvent.TeleportCause.PLUGIN);
|
player.teleport(player.getLocation(), PlayerTeleportEvent.TeleportCause.PLUGIN);
|
||||||
player.setAllowFlight(wasAllowedToFly);
|
player.setAllowFlight(wasAllowedToFly);
|
||||||
player.setFlying(wasFlying);
|
player.setFlying(wasFlying);
|
||||||
|
|
4
src/main/java/xyz/ineanto/nicko/packet/PacketSender.java
Normal file
4
src/main/java/xyz/ineanto/nicko/packet/PacketSender.java
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
package xyz.ineanto.nicko.packet;
|
||||||
|
|
||||||
|
public interface PacketSender {
|
||||||
|
}
|
Loading…
Reference in a new issue