Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Please note that this build includes changes to meet upstreams requirements for nullability annotations. While we aim for a level of accuracy, these might not be 100% correct, if there are any issues, please speak to us on discord, or open an issue on the tracker to discuss. Bukkit Changes: 9a6a1de3 Remove nullability annotations from enum constructors 3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API CraftBukkit Changes: 8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep 8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals 39a287b7 Don't ignore newlines in PlayerListHeader/Footer Spigot Changes: cf694d87 Add nullability annotations
This commit is contained in:
parent
c3c889523f
commit
0976d52bbd
261 changed files with 3224 additions and 2923 deletions
|
@ -1,4 +1,4 @@
|
|||
From 4c16ebe8f181e90a58c0d8546eec8bed09fbb5f7 Mon Sep 17 00:00:00 2001
|
||||
From 935c2498cb5d9d4920e90ab90ff786114a1d114f Mon Sep 17 00:00:00 2001
|
||||
From: Sweepyoface <github@sweepy.pw>
|
||||
Date: Sat, 17 Jun 2017 18:48:06 -0400
|
||||
Subject: [PATCH] Add UnknownCommandEvent
|
||||
|
@ -6,28 +6,29 @@ Subject: [PATCH] Add UnknownCommandEvent
|
|||
|
||||
diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..19d634c3
|
||||
index 000000000..251342c3c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
|
||||
@@ -0,0 +1,77 @@
|
||||
@@ -0,0 +1,82 @@
|
||||
+package org.bukkit.event.command;
|
||||
+
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.Event;
|
||||
+
|
||||
+import javax.annotation.Nullable;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Thrown when a player executes a command that is not defined
|
||||
+ */
|
||||
+public class UnknownCommandEvent extends Event {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private CommandSender sender;
|
||||
+ private String commandLine;
|
||||
+ private String message;
|
||||
+ @NotNull private CommandSender sender;
|
||||
+ @NotNull private String commandLine;
|
||||
+ @Nullable private String message;
|
||||
+
|
||||
+ public UnknownCommandEvent(final CommandSender sender, final String commandLine, final String message) {
|
||||
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) {
|
||||
+ super(false);
|
||||
+ this.sender = sender;
|
||||
+ this.commandLine = commandLine;
|
||||
|
@ -40,6 +41,7 @@ index 00000000..19d634c3
|
|||
+ *
|
||||
+ * @return Sender of the command
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public CommandSender getSender() {
|
||||
+ return sender;
|
||||
+ }
|
||||
|
@ -50,6 +52,7 @@ index 00000000..19d634c3
|
|||
+ *
|
||||
+ * @return Command sent
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public String getCommandLine() {
|
||||
+ return commandLine;
|
||||
+ }
|
||||
|
@ -73,20 +76,22 @@ index 00000000..19d634c3
|
|||
+ *
|
||||
+ * @param message the message to be returned, or null
|
||||
+ */
|
||||
+ public void setMessage(String message) {
|
||||
+ public void setMessage(@Nullable String message) {
|
||||
+ this.message = message;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue