Skip to content

Commit

Permalink
minor fix for raid PR and todo comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 1, 2022
1 parent 5a502c6 commit cd91bf4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Expand Up @@ -29,9 +29,9 @@ public class RaidScriptEvent<T extends RaidEvent> extends BukkitScriptEvent {
// heroes: a list of PlayerTags that have participated in the raid
// raiders: a list of raider EntityTags that remain in the current wave
// status: the current status of the raid. See <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Raid.RaidStatus.html>
// ticks: the raid's age in ticks
// age: the raid's age (active time) as a DurationTag
// level: the Bad Omen level that the raid was started with
// spawned_groups: the amount of raider groups spawned
// spawned_groups: the number of raider groups spawned
// total_groups: the number of groups planned to spawn or already spawned
// health: the combined health of all current raiders
// waves: the number of waves in the raid
Expand Down Expand Up @@ -59,7 +59,7 @@ public static MapTag getRaidMap(Raid raid) {
}
data.putObject("raiders", raiders);
data.putObject("status", new ElementTag(raid.getStatus().name(), true));
data.putObject("ticks", new DurationTag(raid.getActiveTicks()));
data.putObject("age", new DurationTag(raid.getActiveTicks()));
data.putObject("level", new ElementTag(raid.getBadOmenLevel()));
data.putObject("total_groups", new ElementTag(raid.getTotalGroups()));
data.putObject("spawned_groups", new ElementTag(raid.getSpawnedGroups()));
Expand Down
Expand Up @@ -17,7 +17,7 @@

public abstract class PlayerHelper {

public abstract void stopSound(Player player, String sound, SoundCategory category); // TODO: 1.19 - remove the category param
public abstract void stopSound(Player player, String sound, SoundCategory category); // TODO: remove the category param once 1.19 is the minimum version

public FakeEntity sendEntitySpawn(List<PlayerTag> players, DenizenEntityType entityType, LocationTag location, ArrayList<Mechanism> mechanisms, int customId, UUID customUUID, boolean autoTrack) {
throw new UnsupportedOperationException();
Expand Down
Expand Up @@ -3702,7 +3702,7 @@ else if (getPlayerEntity().getGameMode() == GameMode.SPECTATOR) {
if (mechanism.hasValue()) {
if (mechanism.getValue().matchesEnum(SoundCategory.class)) {
category = mechanism.getValue().asEnum(SoundCategory.class);
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19)) { // TODO: 1.19
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19)) {
getPlayerEntity().stopSound(category);
return;
}
Expand Down
Expand Up @@ -74,7 +74,7 @@ public boolean isGate() {
return material.getModernData() instanceof Gate;
}

public boolean isLantern() { // TODO: 1.19 - Lantern extends Hangable
public boolean isLantern() { // TODO: remove once 1.19 is the minimum - Lantern extends Hangable
return material.getModernData() instanceof Lantern;
}

Expand All @@ -86,7 +86,7 @@ public Gate getGate() {
return (Gate) material.getModernData();
}

public Lantern getLantern() { // TODO: 1.19 - Lantern extends Hangable
public Lantern getLantern() { // TODO: remove once 1.19 is the minimum - Lantern extends Hangable
return (Lantern) material.getModernData();
}

Expand Down
Expand Up @@ -238,7 +238,7 @@ public void execute(ScriptEntry scriptEntry) {
if (targets != null) {
for (PlayerTag player : targets) {
if (player.isValid() && player.isOnline()) {
player.getPlayerEntity().playEffect(location, effect, data.asInt()); // TODO: 1.13
player.getPlayerEntity().playEffect(location, effect, data.asInt());
}
}
}
Expand Down

0 comments on commit cd91bf4

Please sign in to comment.