@@ -109,4 +109,56 @@ default boolean setOwner(OfflinePlayer player) {
109
109
* @return {@code true} if the owner was successfully set, otherwise {@code false}
110
110
*/
111
111
boolean setOwner (UUID uuid );
112
+
113
+ /**
114
+ * Checks whether the specified player can deposit the specified amount in the given currency.
115
+ * <p>
116
+ * Returns {@code false} if {@link #canHold(Currency)} returns {@code false}
117
+ *
118
+ * @param player the player attempting to make the deposit
119
+ * @param amount the amount being attempted to deposit
120
+ * @param currency the currency of the deposit
121
+ * @return {@code true} if the player can deposit the specified amount, otherwise {@code false}
122
+ */
123
+ default boolean canDeposit (OfflinePlayer player , Number amount , Currency currency ) {
124
+ return canDeposit (player .getUniqueId (), amount , currency );
125
+ }
126
+
127
+ /**
128
+ * Checks whether the specified uuid can deposit the specified amount in the given currency.
129
+ * <p>
130
+ * Returns {@code false} if {@link #canHold(Currency)} returns {@code false}
131
+ *
132
+ * @param uuid the uuid of the player attempting to make the deposit
133
+ * @param amount the amount being attempted to deposit
134
+ * @param currency the currency of the deposit
135
+ * @return {@code true} if the player can deposit the specified amount, otherwise {@code false}
136
+ */
137
+ boolean canDeposit (UUID uuid , Number amount , Currency currency );
138
+
139
+ /**
140
+ * Checks whether the specified player can withdraw the specified amount in the given currency.
141
+ * <p>
142
+ * Returns {@code false} if {@link #canHold(Currency)} returns {@code false}
143
+ *
144
+ * @param player the player attempting to make the withdrawal
145
+ * @param amount the amount being attempted to withdraw
146
+ * @param currency the currency of the withdrawal
147
+ * @return {@code true} if the player can withdraw the specified amount, otherwise {@code false}
148
+ */
149
+ default boolean canWithdraw (OfflinePlayer player , Number amount , Currency currency ) {
150
+ return canWithdraw (player .getUniqueId (), amount , currency );
151
+ }
152
+
153
+ /**
154
+ * Checks whether the specified uuid can withdraw the specified amount in the given currency.
155
+ * <p>
156
+ * Returns {@code false} if {@link #canHold(Currency)} returns {@code false}
157
+ *
158
+ * @param uuid the UUID of the player attempting to make the withdrawal
159
+ * @param amount the amount being attempted to withdraw
160
+ * @param currency the currency of the withdrawal
161
+ * @return {@code true} if the player can withdraw the specified amount, otherwise {@code false}
162
+ */
163
+ boolean canWithdraw (UUID uuid , Number amount , Currency currency );
112
164
}
0 commit comments