Compare commits
No commits in common. "a10607092b98625805780fee582add851d8c8af8" and "d11cf25fc8ebb21d53188565aa115602b64f5c8f" have entirely different histories.
a10607092b
...
d11cf25fc8
|
|
@ -150,10 +150,10 @@ public class SnowballEvent implements Listener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (teamPlayerHit.get().getTeam().getId().equals(teamPlayerShooter.get().getTeam().getId())) {
|
if (teamPlayerHit.get().getTeam().getId() == teamPlayerShooter.get().getTeam().getId()) {
|
||||||
log.debug("The shooter hit a member of their own team");
|
log.debug("The shooter hit a member of their own team");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
consumer.apply(hitPlayer, shooter, teamPlayerShooter.get(), snowball);
|
consumer.apply(hitPlayer, shooter, teamPlayerHit.get(), snowball);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import org.bukkit.inventory.EquipmentSlot;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
@ -81,14 +80,8 @@ public class Flag implements Runnable {
|
||||||
if (flagCarrier != null) {
|
if (flagCarrier != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
flagLocation.getNearbyPlayers(5).forEach(nearbyPlayer -> {
|
//TODO knockback enemies from flag location to create space for person who captured mayb short speed boost and heal?
|
||||||
if (nearbyPlayer.getUniqueId().equals(player.getUniqueId())) {
|
//TODO add de-buffs and enable buffs for others?
|
||||||
return;
|
|
||||||
}
|
|
||||||
Vector direction = nearbyPlayer.getLocation().toVector().subtract(flagLocation.toVector()).normalize();
|
|
||||||
direction.setY(0.2);
|
|
||||||
nearbyPlayer.setVelocity(direction.multiply(5));
|
|
||||||
});
|
|
||||||
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;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class MageCreator {
|
||||||
@Contract("_ -> new")
|
@Contract("_ -> new")
|
||||||
public static @NotNull GameClass createMage(@NotNull TeamColor teamColor) {
|
public static @NotNull GameClass createMage(@NotNull TeamColor teamColor) {
|
||||||
return new Mage(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
|
return new Mage(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
|
||||||
20, 100, 1);
|
20, 100, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Contract(value = " -> new", pure = true)
|
@Contract(value = " -> new", pure = true)
|
||||||
|
|
@ -50,7 +50,7 @@ public class MageCreator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NotNull ItemStack getDisplayItem(@NotNull TeamColor teamColor) {
|
private static @NotNull ItemStack getDisplayItem(@NotNull TeamColor teamColor) {
|
||||||
ItemStack itemStack = new ItemStack(Material.SNOWBALL);
|
ItemStack itemStack = new ItemStack(Material.IRON_SWORD);
|
||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
itemMeta.displayName(miniMessage.deserialize(String.format("<color:%s>Mage</color>", teamColor.hex())));
|
itemMeta.displayName(miniMessage.deserialize(String.format("<color:%s>Mage</color>", teamColor.hex())));
|
||||||
itemMeta.lore(List.of(
|
itemMeta.lore(List.of(
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,7 @@ import org.jetbrains.annotations.Contract;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Unmodifiable;
|
import org.jetbrains.annotations.Unmodifiable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.IntStream;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class TrapperCreator {
|
public class TrapperCreator {
|
||||||
|
|
@ -34,22 +32,17 @@ public class TrapperCreator {
|
||||||
|
|
||||||
@Contract("_ -> new")
|
@Contract("_ -> new")
|
||||||
private static @NotNull @Unmodifiable List<ItemStack> getTools(TeamColor teamColor) {
|
private static @NotNull @Unmodifiable List<ItemStack> getTools(TeamColor teamColor) {
|
||||||
List<ItemStack> itemStacks = new ArrayList<>(List.of(getShovel(teamColor)));
|
return (List.of(getShovel(teamColor), getPowderedSnow(teamColor)));
|
||||||
itemStacks.addAll(getPowderedSnow(teamColor));
|
|
||||||
return itemStacks;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NotNull List<ItemStack> getPowderedSnow(@NotNull TeamColor teamColor) {
|
private static @NotNull ItemStack getPowderedSnow(@NotNull TeamColor teamColor) {
|
||||||
ItemStack powderedSnow = new ItemStack(Material.POWDER_SNOW_BUCKET);
|
ItemStack powderedSnow = new ItemStack(Material.POWDER_SNOW_BUCKET);
|
||||||
|
powderedSnow.setAmount(16);
|
||||||
ItemMeta itemMeta = powderedSnow.getItemMeta();
|
ItemMeta itemMeta = powderedSnow.getItemMeta();
|
||||||
itemMeta.itemName(MiniMessage.miniMessage().deserialize(
|
itemMeta.itemName(MiniMessage.miniMessage().deserialize(
|
||||||
String.format("<color:%s>Snow Trap</color>", teamColor.hex())));
|
String.format("<color:%s>Snow Trap</color>", teamColor.hex())));
|
||||||
powderedSnow.setItemMeta(itemMeta);
|
powderedSnow.setItemMeta(itemMeta);
|
||||||
List<ItemStack> snowBuckets = new ArrayList<>();
|
return powderedSnow;
|
||||||
for (int i = 0; i < 16; i++) {
|
|
||||||
snowBuckets.add(powderedSnow.clone());
|
|
||||||
}
|
|
||||||
return snowBuckets;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NotNull ItemStack getShovel(@NotNull TeamColor teamColor) {
|
private static @NotNull ItemStack getShovel(@NotNull TeamColor teamColor) {
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,9 @@ public class Mage extends GameClass {
|
||||||
|
|
||||||
snowball.setShooter(shooter);
|
snowball.setShooter(shooter);
|
||||||
|
|
||||||
double velocityChangeX = (Math.random() - 0.5) * 0.5;
|
double velocityChangeX = (Math.random() - 0.5) * 0.2;
|
||||||
double velocityChangeY = (Math.random() - 0.5) * 0.5;
|
double velocityChangeY = (Math.random() - 0.5) * 0.2;
|
||||||
double velocityChangeZ = (Math.random() - 0.5) * 0.5;
|
double velocityChangeZ = (Math.random() - 0.5) * 0.2;
|
||||||
|
|
||||||
Vector newVelocity = velocity.clone().add(new Vector(velocityChangeX, velocityChangeY, velocityChangeZ));
|
Vector newVelocity = velocity.clone().add(new Vector(velocityChangeX, velocityChangeY, velocityChangeZ));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public final class PlayerStat {
|
||||||
case TIME_SPEND_CAPTURING_FLAG -> timeSpendCapturingFlag++;
|
case TIME_SPEND_CAPTURING_FLAG -> timeSpendCapturingFlag++;
|
||||||
case DEATHS_IN_POWDERED_SNOW -> {
|
case DEATHS_IN_POWDERED_SNOW -> {
|
||||||
if (someoneDiedInPowderedSnow) {
|
if (someoneDiedInPowderedSnow) {
|
||||||
deathsInPowderedSnow++;
|
deathsInPowderedSnow++; //TODO announce if they are the first person to do this and save they are the first
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(uuid);
|
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(uuid);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#Sat Mar 01 00:39:55 CET 2025
|
#Fri Feb 28 23:59:35 CET 2025
|
||||||
buildNumber=91
|
buildNumber=83
|
||||||
version=0.1
|
version=0.1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user