Compare commits
No commits in common. "4f0a4eff6fb953db587f9680b34cec1e773a5834" and "400032a94cdb39d24b37c98b65f30d42424ba1d1" have entirely different histories.
4f0a4eff6f
...
400032a94c
|
|
@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
import net.kyori.adventure.title.Title;
|
||||
import org.bukkit.*;
|
||||
|
|
@ -21,8 +22,6 @@ import org.bukkit.boss.KeyedBossBar;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
|
@ -84,7 +83,6 @@ public class Flag implements Runnable {
|
|||
player.getInventory().setItem(EquipmentSlot.HEAD, new ItemStack(teamPlayer.getTeam().getFlagMaterial()));
|
||||
Bukkit.getScheduler().runTask(main, () -> flagLocation.getBlock().setType(Material.AIR));
|
||||
flagCarrier = player;
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOWNESS, PotionEffect.INFINITE_DURATION, 0, false, false));
|
||||
notifyAboutCapture();
|
||||
resetFlag();
|
||||
}
|
||||
|
|
@ -144,10 +142,7 @@ public class Flag implements Runnable {
|
|||
} else {
|
||||
winningTeam = optionalTeam.get();
|
||||
spawnFlag(winningTeam.getFlagMaterial());
|
||||
updateDisplay();
|
||||
Title title = Title.title(MiniMessage.miniMessage().deserialize("Team <team> can capture the flag",
|
||||
Placeholder.component("team", winningTeam.getName())), Component.empty());
|
||||
Bukkit.getOnlinePlayers().forEach(player -> player.showTitle(title));
|
||||
//TODO stop capture and let ppl know they can now capture the flag
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -356,8 +351,6 @@ public class Flag implements Runnable {
|
|||
}
|
||||
|
||||
public void resetFlagCarrier() {
|
||||
final Player player = flagCarrier;
|
||||
Bukkit.getScheduler().runTask(main, player::clearActivePotionEffects);
|
||||
flagCarrier = null;
|
||||
winningTeam = null;
|
||||
particleTrail.clear();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#Sat Feb 15 04:08:38 CET 2025
|
||||
buildNumber=55
|
||||
#Sat Feb 15 03:47:20 CET 2025
|
||||
buildNumber=50
|
||||
version=0.1
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user