Commits
Senmori authored and md_5 committed b80e520acb9
187 187 | */ |
188 188 | public abstract int getStartLevel(); |
189 189 | |
190 190 | /** |
191 191 | * Gets the type of {@link ItemStack} that may fit this Enchantment. |
192 192 | * |
193 193 | * @return Target type of the Enchantment |
194 194 | */ |
195 195 | public abstract EnchantmentTarget getItemTarget(); |
196 196 | |
197 + | /** |
198 + | * Checks if this enchantment is a treasure enchantment. |
199 + | * <br> |
200 + | * Treasure enchantments can only be received via looting, trading, or |
201 + | * fishing. |
202 + | * |
203 + | * @return true if the enchantment is a treasure enchantment |
204 + | */ |
205 + | public abstract boolean isTreasure(); |
206 + | |
197 207 | /** |
198 208 | * Check if this enchantment conflicts with another enchantment. |
199 209 | * |
200 210 | * @param other The enchantment to check against |
201 211 | * @return True if there is a conflict. |
202 212 | */ |
203 213 | public abstract boolean conflictsWith(Enchantment other); |
204 214 | |
205 215 | /** |
206 216 | * Checks if this Enchantment may be applied to the given {@link |