Yatopia/patches/api/0008-EMC-AchievementBroadcastEvent.patch
2020-02-26 20:12:29 +01:00

80 lines
2.8 KiB
Diff

From 1f88ea36464241f152926d9c96ba5dc40264b06f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:01:08 -0500
Subject: [PATCH] EMC AchievementBroadcastEvent
---
.../AchievementBroadcastEvent.java | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 src/main/java/com/empireminecraft/customevents/AchievementBroadcastEvent.java
diff --git a/src/main/java/com/empireminecraft/customevents/AchievementBroadcastEvent.java b/src/main/java/com/empireminecraft/customevents/AchievementBroadcastEvent.java
new file mode 100644
index 00000000..326fa580
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/AchievementBroadcastEvent.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2016 Starlis LLC / Daniel Ennis (Aikar) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.empireminecraft.customevents;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AchievementBroadcastEvent extends Event {
+ final Player player;
+ List<Player> receivers = new ArrayList<Player>();
+
+ public Player getPlayer() {
+ return player;
+ }
+
+ public List<Player> getReceivers() {
+ return receivers;
+ }
+
+ public void setReceivers(List<Player> receivers) {
+ this.receivers = receivers;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ public AchievementBroadcastEvent(Player player) {this.player = player;}
+
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
--
2.25.1.windows.1