This commit is contained in:
nearfe 2024-06-15 17:19:30 -03:00
parent 5e638672d9
commit 6ffba0ef6f
2 changed files with 3 additions and 7 deletions

View File

@ -808,6 +808,7 @@ public class PlayerListener implements Listener {
final Player player = event.getEntity(); final Player player = event.getEntity();
final PlayerData playerData = this.plugin.getPlayerManager().getPlayerData(player.getUniqueId()); final PlayerData playerData = this.plugin.getPlayerManager().getPlayerData(player.getUniqueId());
//player.setVelocity(new Vector()); //player.setVelocity(new Vector());
switch (playerData.getPlayerState()) { switch (playerData.getPlayerState()) {
case FIGHTING: case FIGHTING:
if (plugin.getMatchManager().getMatch(playerData) != null) { if (plugin.getMatchManager().getMatch(playerData) != null) {

View File

@ -249,6 +249,7 @@ public final class PlayerUtil {
} }
} }
@SneakyThrows @SneakyThrows
public static void staticDeath(Player player, boolean showPlayer) { public static void staticDeath(Player player, boolean showPlayer) {
int entityId = EntityUtils.getFakeEntityId(); int entityId = EntityUtils.getFakeEntityId();
@ -290,20 +291,14 @@ public final class PlayerUtil {
sentTo.add(watcher); sentTo.add(watcher);
} }
TaskUtil.runLater(() -> { TaskUtil.runLater(() -> {
for ( Player watcher : sentTo ) { for ( Player watcher : sentTo ) {
((CraftPlayer) watcher).getHandle().playerConnection.sendPacket(new PacketPlayOutEntityDestroy(entityId)); ((CraftPlayer) watcher).getHandle().playerConnection.sendPacket(new PacketPlayOutEntityDestroy(entityId));
} }
}, 40L); }, 40L);
Bukkit.getScheduler().runTaskLater(Practice.getInstance(), () -> {
for (Player player1 : Bukkit.getOnlinePlayers()) {
player1.showPlayer(player);
}
}, 60L);
} }
public static void clearWithEnableFly(Player player) { public static void clearWithEnableFly(Player player) {
clearPlayer(player); clearPlayer(player);