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

Bank addon not working #1913

Closed
CuzImLqve opened this issue Jan 5, 2022 · 3 comments
Closed

Bank addon not working #1913

CuzImLqve opened this issue Jan 5, 2022 · 3 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug

Comments

@CuzImLqve
Copy link

Expected behavior

Bank addon loading properly
bentoBox linking to Vault and the economy plugin I'm using

Observed/Actual behavior

These errors when loading the server
totermw_BfCbsn3yur
totermw_lByGlqYGQm

Steps/models to reproduce

  • Installed Vault
  • Installed EconomyPlus
  • Started the server
  • Stopped the server
  • Installed Bentobox with these addons: AOneBlock, Bank, Biomes, Border, Chat, ControlPanel, Level, Likes, Limits, Visit and Warps
  • Started the server
  • Errors showing in console.
    (I tried using CMI's economy but it didn't work either)

BentoBox version

[16:41:24 INFO]: Running PAPER 1.16.5.
[16:41:24 INFO]: BentoBox version: 1.16.2
[16:41:24 INFO]: Database: JSON
[16:41:24 INFO]: Loaded Game Worlds:
[16:41:24 INFO]: oneblock_world (OneBlock): Overworld, Nether*
[16:41:24 INFO]: Loaded Addons:
[16:41:24 INFO]: AOneBlock 1.7.0 (ENABLED)
[16:41:24 INFO]: Bank 1.3.0 (DISABLED)
[16:41:24 INFO]: Biomes 1.14.0 (ENABLED)
[16:41:24 INFO]: Border 3.1.1 (ENABLED)
[16:41:24 INFO]: Chat 1.1.4 (ENABLED)
[16:41:24 INFO]: ControlPanel 1.13.0 (ENABLED)
[16:41:24 INFO]: Level 2.6.5-SNAPSHOT (ENABLED)
[16:41:24 INFO]: Likes 2.1.1 (ENABLED)
[16:41:24 INFO]: Limits 1.15.5 (ENABLED)
[16:41:24 INFO]: Visit 1.3.0 (ENABLED)
[16:41:24 INFO]: Warps 1.10.2 (ENABLED)

Plugin list

Plugins (29): BentoBox, Citizens, CMI, CMILib, CoreProtect, Denizen, EconomyPlus, FeatherBoard, HolographicDisplays, InteractiveBoard, LuckPerms, Multiverse-Core, MyCommand, PlaceholderAPI, PlugMan, ProtocolLib, ShopChest, TAB, TradePlus, Vault, VentureChat, ViaVersion, VoidGen, VoidTeleport, WorldBorderAPI, WorldEdit, WorldGuard, WorldGuardExtraFlags, zItemStacker

Other

No response

@BONNe
Copy link
Member

BONNe commented Jan 5, 2022

I think the issue mostly happens with Plugins that have Economy integration in onEnable phase.
In these situations, if BentoBox is enabled before that plugin, it will complain about the missing economy.

By looking at logs, it looks like EconomyPlus (that has economy onEnable) is loaded before BentoBox, however, onEnable is called for BentoBox before EconomyPlus plugin.

I do not know what exactly we can do it currently, as an order for onEnable is decided by Spigot.

Probably, as plugins start to register their economies in the onEnable, BentoBox should stop checking VaultHook.Hook at the start, and do in only when someone requests economy integration.

@CuzImLqve
Copy link
Author

The fact is that I've tried with CMI economy too, and I've put economyplus as a dependency so the plugin shoudn't even start if economyplus isn't started yet, but it still gives the same problem.

@tastybento tastybento self-assigned this Jan 8, 2022
@tastybento tastybento added the Status: In progress Working on the issue. label Jan 8, 2022
@tastybento
Copy link
Member

The the latest 1.16.5 branch snapshot.

I switched the Vault hooking so that it does so one tick after BentoBox starts. This is also where we hook into PlaceholderAPI. In testing this seemed to work. EconomyPlus doesn't hook into Vault at startup, so this was the issue. Personally, I think they should because of this very problem - if other plugins are checking for economies at startup - a reasonable thing to do - then they should be there, but they are not. The only work around is to do the economy check later.

I notice you are on 1.16.5. I am back-porting all the recent BentoBox changes into the 1.16.5_LTS branch and you can pick up the snapshot from https://ci.codemc.io/job/BentoBoxWorld/job/BentoBox%201.16.5/

@tastybento tastybento added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants