Restore lost player cooldown APIs

Accidentally removed in 0976d52bbd
This commit is contained in:
Zach Brown 2019-03-24 13:16:59 -04:00
parent 5368451566
commit c5ef31cb0d
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
29 changed files with 142 additions and 102 deletions

View file

@ -1,44 +0,0 @@
From d4d37f326a358195017d5c6cb1b72631cfeb1dfe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 6 Oct 2018 21:14:29 -0400
Subject: [PATCH] Material API additions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 6120955b1..c628a9349 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -74,6 +74,7 @@ import org.jetbrains.annotations.Nullable;
/**
* An enum of all material IDs accepted by the official server and client
*/
+@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
public enum Material implements Keyed {
//<editor-fold desc="Materials" defaultstate="collapsed">
ACACIA_BOAT(27326, 1),
@@ -2986,6 +2987,22 @@ public enum Material implements Keyed {
}
}
+ // Paper start
+
+ /**
+ * @return If the type is either AIR, CAVE_AIR or VOID_AIR
+ */
+ public boolean isEmpty() {
+ switch (this) {
+ case AIR:
+ case CAVE_AIR:
+ case VOID_AIR:
+ return true;
+ }
+ return false;
+ }
+ // Paper end
+
/**
* Do not use for any reason.
*
--
2.21.0