Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
3996e6ef29
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: c7c11188 SPIGOT-2620: Add Player#sendBlockChanges() f63d2b44 Improve annotation test on parameters 3372e7b4 SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes a1e8a9ab PR-793: Ignore .checkstyle file generated by Eclipse IDE CraftBukkit Changes: c2c39089e SPIGOT-2620: Add Player#sendBlockChanges() 8209158db PR-1113: Ignore .checkstyle file generated by Eclipse IDE Spigot Changes: 4aa5ead2 Rebuild patches
42 Zeilen
1.2 KiB
Diff
42 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 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 47d14a334c0f8d0918a2f08d5bf54f82370aaf44..666ed1075dad7c233c450f033d2309c748a2be26 100644
|
|
--- a/src/main/java/org/bukkit/Material.java
|
|
+++ b/src/main/java/org/bukkit/Material.java
|
|
@@ -109,6 +109,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">
|
|
AIR(9648, 0),
|
|
@@ -4113,6 +4114,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.
|
|
*
|