mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07:00
[ci skip] Cleanup events (#10202)
This commit is contained in:
@@ -14,6 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+import org.bukkit.block.Sign;
|
||||
+import org.bukkit.block.sign.Side;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
@@ -27,12 +28,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * Cancelling this event stops the sign editing menu from opening.
|
||||
+ */
|
||||
+public class PlayerOpenSignEvent extends PlayerEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+ private boolean cancel = false;
|
||||
+
|
||||
+ private final Sign sign;
|
||||
+ private final Side side;
|
||||
+ private final Cause cause;
|
||||
+
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerOpenSignEvent(final @NotNull Player editor, final @NotNull Sign sign, final @NotNull Side side, final @NotNull Cause cause) {
|
||||
+ super(editor);
|
||||
@@ -48,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Sign getSign() {
|
||||
+ return sign;
|
||||
+ return this.sign;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -59,7 +63,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Side getSide() {
|
||||
+ return side;
|
||||
+ return this.side;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -68,17 +72,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the cause
|
||||
+ */
|
||||
+ public @NotNull Cause getCause() {
|
||||
+ return cause;
|
||||
+ return this.cause;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancel;
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ this.cancel = cancel;
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
@@ -105,7 +109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ INTERACT,
|
||||
+ /**
|
||||
+ * The event was triggered via a plugin with {@link org.bukkit.entity.HumanEntity#openSign(Sign, Side)}
|
||||
+ * The event was triggered via a plugin with {@link HumanEntity#openSign(Sign, Side)}
|
||||
+ */
|
||||
+ PLUGIN,
|
||||
+ /**
|
||||
|
Reference in New Issue
Block a user