move extra plugins patch up & more work
This commit is contained in:
parent
7665ae86d6
commit
e481692afd
458 changed files with 192 additions and 190 deletions
|
@ -1,25 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 5 Jun 2018 22:59:50 -0400
|
||||
Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index e8783b0116f4efd5447a5f6f260506000983ffd2..9fee2f157ac5149cd65136bf8468deaca410fbf4 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -636,5 +636,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
public String getI18NDisplayName() {
|
||||
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
}
|
||||
+
|
||||
+ public int getMaxItemUseDuration() {
|
||||
+ if (type == null || type == Material.AIR || !type.isItem()) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ // Requires access to NMS
|
||||
+ return ensureServerConversions().getMaxItemUseDuration();
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue