Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NoSuchMethodError in getEnchantmentLevel method #391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MillionthOdin16
Copy link
Contributor

Add exception handling for NoSuchMethodError in the getEnchantmentLevel method of the NewEcoFastItemStack class.

  • Import Logger class for logging purposes.
  • Add a try-catch block to the getEnchantmentLevel method to handle NoSuchMethodError exceptions.
  • Log an error message if a NoSuchMethodError is caught.
  • Return 0 as the default enchantment level if a NoSuchMethodError is caught.

Auxilor/libreforge#176 (comment)

Add exception handling for `NoSuchMethodError` in the `getEnchantmentLevel` method of the `NewEcoFastItemStack` class.

* Import `Logger` class for logging purposes.
* Add a try-catch block to the `getEnchantmentLevel` method to handle `NoSuchMethodError` exceptions.
* Log an error message if a `NoSuchMethodError` is caught.
* Return 0 as the default enchantment level if a `NoSuchMethodError` is caught.

Auxilor/libreforge#176 (comment)
@MillionthOdin16 MillionthOdin16 requested a review from WillFP as a code owner March 5, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant