Requested Changes for PR
This commit is contained in:
parent
b5f5663d47
commit
83dddab0e5
2 changed files with 1 additions and 56 deletions
|
@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..c9f821dd291c486c56597cc32135f481
|
|||
+public class DragonPrepareDeathSoundTargetsEvent extends EntityEvent {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+ private Set<Player> playerList;
|
||||
+ public Set<Player> playerList;
|
||||
+
|
||||
+ public DragonPrepareDeathSoundTargetsEvent(final @NotNull EnderDragon enderDragon, Collection<? extends Player> players) {
|
||||
+ super(enderDragon);
|
||||
|
@ -35,60 +35,6 @@ index 0000000000000000000000000000000000000000..c9f821dd291c486c56597cc32135f481
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the list of {@link Player}s that are going to hear the sound.
|
||||
+ *
|
||||
+ * @return Collection of Players
|
||||
+ */
|
||||
+ public Set<Player> getPlayerList() {
|
||||
+ return playerList;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the player list to a Collection of defined {@link Player}s
|
||||
+ *
|
||||
+ * @param newPlayerList The new collection of players to hear the sound.
|
||||
+ */
|
||||
+ public void setPlayerList(Set<Player> newPlayerList) {
|
||||
+ playerList = newPlayerList;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Add another {@link Player} to the list of that will hear the death sound if not already present.
|
||||
+ *
|
||||
+ * @param player The player to be added
|
||||
+ */
|
||||
+ public void addPlayer(Player player) {
|
||||
+ playerList.add(player);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Will remove a {@link Player} from the list that will hear the death sound if present.
|
||||
+ *
|
||||
+ * @param player The player to be removed
|
||||
+ */
|
||||
+ public void removePlayer(Player player) {
|
||||
+ playerList.remove(player);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Will add a collection of {@link Player}s to the list that will hear the death sound if not already present.
|
||||
+ *
|
||||
+ * @param playersToAdd Collection of players to be added
|
||||
+ */
|
||||
+ public void addPlayers(Set<Player> playersToAdd) {
|
||||
+ playerList.addAll(playersToAdd);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Will remove a collection of {@link Player}s from the list that will hear the death sound if present.
|
||||
+ *
|
||||
+ * @param playersToRemove Collection of players to be removed.
|
||||
+ */
|
||||
+ public void removePlayers(Set<Player> playersToRemove) {
|
||||
+ playerList.removeAll(playersToRemove);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * The {@link EnderDragon} that fired this event when it died.
|
||||
+ *
|
||||
+ * @return the dragon
|
||||
|
|
|
@ -35,7 +35,6 @@ index bd6fee3e3ad9116802ff8bb57bfa741b881c4057..f225942db664b8ce6f97dd907f39daca
|
|||
// Paper end - add EntityFertilizeEggEvent
|
||||
+
|
||||
+ // Paper start - add DragonPrepareDeathSoundTargetsEvent
|
||||
+
|
||||
+ /**
|
||||
+ * Calls {@link io.papermc.paper.event.entity.DragonPrepareDeathSoundTargetsEvent}
|
||||
+ * Listeners can add and remove players from the list of players that will hear the dragon death sound.
|
||||
|
|
Loading…
Reference in a new issue