Add restrict-player-reloot-time config (#7652)
This commit is contained in:
parent
3b4839ee32
commit
20a71c58d3
3 changed files with 107 additions and 20 deletions
|
@ -58,10 +58,10 @@ index 0000000000000000000000000000000000000000..b387894fe8001edb41ad2ad2b70ebabe
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..97815eeb231cf0706b34fa47a4f7d1bb786305b4
|
||||
index 0000000000000000000000000000000000000000..2b01a50b6e18856f4c9e28340a7a111cae646a0a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
|
||||
@@ -0,0 +1,116 @@
|
||||
@@ -0,0 +1,125 @@
|
||||
+package com.destroystokyo.paper.loottable;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
|
@ -106,6 +106,15 @@ index 0000000000000000000000000000000000000000..97815eeb231cf0706b34fa47a4f7d1bb
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this player can loot this block. Takes into account the "restrict player reloot" settings
|
||||
+ *
|
||||
+ * @param player the player to check
|
||||
+ *
|
||||
+ * @return Whether this player can loot this block
|
||||
+ */
|
||||
+ boolean canPlayerLoot(@NotNull UUID player);
|
||||
+
|
||||
+ /**
|
||||
+ * Has this player ever looted this block
|
||||
+ * @param player The player to check
|
||||
+ * @return Whether or not this player has looted this block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue