Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
Fix custom setup instruction not showing up after language setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dementisimus committed Jul 16, 2021
1 parent 39e1038 commit 1c93632
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<groupId>dev.dementisimus.capi</groupId>
<artifactId>CoreAPI</artifactId>
<version>latest</version>
<scope>provided</scope>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/dev/dementisimus/mrs/MapRatingSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import dev.dementisimus.capi.core.config.Config;
import dev.dementisimus.capi.core.core.BukkitCoreAPI;
import dev.dementisimus.capi.core.core.CoreAPI;
import dev.dementisimus.capi.core.helpers.bukkit.BukkitHelper;
import dev.dementisimus.capi.core.setup.DefaultSetUpState;
import dev.dementisimus.capi.core.translations.CoreAPITranslations;
import dev.dementisimus.capi.core.translations.Translation;
Expand Down Expand Up @@ -50,13 +51,14 @@ public void onEnable() {
private void init() {
this.bukkitCoreAPI = new BukkitCoreAPI(this);
this.coreAPI = this.bukkitCoreAPI.getCoreAPI();
BukkitHelper.registerEvents(this, new Listener[]{new SetUpStateChangeListener(this), new SetUpStatePrintInstructionsListener(this)});
this.coreAPI.prepareInit(new String[]{DefaultSetUpState.LANGUAGE.name(), AdditionalSetUpState.USE_STANDALONE_VERSION.name(), DefaultSetUpState.STORAGE_TYPE.name(), DefaultSetUpState.MONGODB_CONNECTION_STRING.name(), DefaultSetUpState.MONGODB_DATABASE.name(), DefaultSetUpState.MARIADB_HOST.name(), DefaultSetUpState.MARIADB_PORT.name(), DefaultSetUpState.MARIADB_USER.name(), DefaultSetUpState.MARIADB_PASSWORD.name()}, new ResourceBundle[]{getBundle(this.coreAPI.getBaseName(), ENGLISH), getBundle(this.coreAPI.getBaseName(), GERMAN)}, capi -> capi.enableDatabaseUsage(new String[]{MAPRATINGS.value}, new String[]{RATINGROW.value}));
this.coreAPI.init(initialized -> {
this.createMapRatingAPIObject();
MapRatingInitializationQueue.executeCallbackInQueue(mapRating -> {
if(mapRating != null) {
this.mapRating = mapRating;
this.bukkitCoreAPI.addListenersToRegisterOnSetUpDone(new Listener[]{new InventoryClickListener(this), new PlayerLanguageListener(this), new PlayerInteractListener(this), new SetUpStateChangeListener(this), new SetUpStatePrintInstructionsListener(this)});
this.bukkitCoreAPI.addListenersToRegisterOnSetUpDone(new Listener[]{new InventoryClickListener(this), new PlayerLanguageListener(this), new PlayerInteractListener(this)});
this.bukkitCoreAPI.addCommandToRegisterOnSetUpDone("maprating", new COMMAND_maprating(this));
this.bukkitCoreAPI.addCommandToRegisterOnSetUpDone("mr", new COMMAND_maprating(this));
this.bukkitCoreAPI.registerCommandsAndListeners();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ main: dev.dementisimus.mrs.MapRatingSystem
author: dementisimus
version: 1.2.0
website: dementisimus.dev
softdepend: [ CoreAPI, ProtocolLib ]
softdepend: [ CoreAPI, ProtocolLib, CoreAPIDependencies ]
api-version: 1.17

commands:
Expand Down

0 comments on commit 1c93632

Please sign in to comment.