ok (still isnt fixed)

This commit is contained in:
NotCoded committed 2024-07-08 20:49:37 +02:00
1 parent a0e5f16e6a
commit 32455e2364
3 files changed
+14 -4

No files matched your search

+5 -1
View File
@@ -11,6 +11,8 @@ base {
}
repositories {
flatDir { dirs("libraries") }
maven { url 'https://repo.minebench.de/' }
maven { url 'https://maven.nucleoid.xyz' }
maven { url 'https://masa.dy.fi/maven' }
@@ -29,8 +31,10 @@ dependencies {
include(implementation("net.kyori:adventure-text-minimessage:4.17.0-SNAPSHOT"))
include(implementation("net.kyori:adventure-text-serializer-gson:4.17.0-SNAPSHOT"))
include(modImplementation("io.github.blumbo:blf-scheduler:1.0.3-${project.minecraft_version}"))
include(implementation("com.google.code.gson:gson:${project.gson_version}"))
include(modImplementation include("eu.pb4:sgui:1.5.1+1.20.5"))
include(modImplementation "eu.pb4:sgui:1.5.1+1.20.5")
}
loom {
Binary file not shown.
@@ -1,6 +1,8 @@
package com.nexia.teams.utilities;
import com.nexia.teams.utilities.time.ServerTime;
import io.github.blumbo.blfscheduler.BlfRunnable;
import io.github.blumbo.blfscheduler.BlfScheduler;
import net.minecraft.server.level.ServerPlayer;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
@@ -48,9 +50,13 @@ public class CombatUtil {
public static boolean addPlayer(ServerPlayer player) {
CombatUtil.logger.debug("Spawning player {} as a fake player.", player.getScoreboardName());
ServerTime.minecraftServer.getCommands().performPrefixedCommand(ServerTime.minecraftServer.createCommandSourceStack().withPermission(4), "player " + player.getScoreboardName() + " shadow");
combatLoggedPlayersTimer.put(player.getUUID(), 30);
BlfScheduler.delay(10, new BlfRunnable() {
@Override
public void run() {
ServerTime.minecraftServer.getCommands().performPrefixedCommand(ServerTime.minecraftServer.createCommandSourceStack().withPermission(4), "player " + player.getScoreboardName() + " spawn");
combatLoggedPlayersTimer.put(player.getUUID(), 30);
}
});
return getPlayer(player.getUUID()) != null;
}