Skip to content

Commit

Permalink
Refuses to run if database is YAML.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jun 27, 2019
1 parent 017ba45 commit 53e570a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.wasteofplastic</groupId>
<artifactId>InvSwitcher</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.4-SNAPSHOT</version>

<name>InvSwitcher</name>
<description>InvSwitcher is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@
import com.wasteofplastic.invswitcher.listeners.PlayerTeleportListener;

import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType;

public class InvSwitcher extends Addon {
private Store store;


@Override
public void onEnable() {
// Verify that we're not running on a YAML database
if (this.getPlugin().getSettings().getDatabaseType().equals(DatabaseType.YAML)) {
this.setState(State.DISABLED);
this.logError("This addon is incompatible with YAML database. Please use another type, like JSON.");
return;
}
// Create the store
store = new Store(this);
// Register the listeners
getServer().getPluginManager().registerEvents(new PlayerTeleportListener(this), getPlugin());
registerListener(new PlayerTeleportListener(this));
}


Expand Down

0 comments on commit 53e570a

Please sign in to comment.