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