Skip to content

Commit

Permalink
Add MAStaff check
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelillo15 committed Apr 28, 2024
1 parent 810d3c9 commit ea23811
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class StaffBootstrapper extends JavaPlugin implements NookureStaffPlatfor

@Override
public void onEnable() {
checkMAStaff();

Bukkit.getConsoleSender().sendMessage(Component.text("""
▐ ▄ ▄ •▄ ▄• ▄▌▄▄▄ ▄▄▄ . .▄▄ · ▄▄▄▄▄ ▄▄▄· ·▄▄▄·▄▄▄
Expand All @@ -50,6 +52,15 @@ public void onEnable() {
plugin.onEnable();
}

public void checkMAStaff() {
if (Bukkit.getPluginManager().getPlugin("MAStaff") != null) {
Bukkit.getConsoleSender().sendMessage(Component.text("MAStaff detected!").color(NamedTextColor.RED));
Bukkit.getConsoleSender().sendMessage(Component.text("Please remove it to avoid conflicts.").color(NamedTextColor.RED));
Bukkit.getConsoleSender().sendMessage(Component.text("Disabling NookureStaff...").color(NamedTextColor.RED));
Bukkit.getPluginManager().disablePlugin(this);
}
}

private void loadDependencies() {
LibraryManager manager;

Expand Down

0 comments on commit ea23811

Please sign in to comment.