Skip to content

can't disable the Mini Map Addon #2

Open
@TheWylot

Description

@TheWylot

General Troubleshooting

  • I am using the latest version of the LabyMod 4 Server API.
  • I am using the latest version of LabyMod.
  • I have checked for similar issues on the Issue-tracker.
  • I have checked for Pull Requests that might already address this issue.

Platforms

Spigot / Bukkit, Other (please specify in the additional information text field at the bottom)

Affected Minecraft Version(s)

ALL of the Labymod Versions

Expected Behaviour

I can disable other addon with below code, but when im going to disable "labysminimap" it doesnt function at all.

Code Example for Reproduction Steps

@Override
    public void onEnable() {
        instance = this;
        LabyModProtocolService.initialize(this);
        getServer().getPluginManager().registerEvents(new Listener() {
            @EventHandler
            public void onLabyModPlayerJoin(LabyModPlayerJoinEvent event) {
                Player player = event.labyModPlayer().getPlayer();
                List<String> addonsToDisable = new ArrayList<>();

                addonsToDisable.add("keystrokes"); // it works, getting disabled.
                addonsToDisable.add("labysminimap"); // it doesnt function

                LabyModPlayer labyModPlayer = LabyModProtocolService.get().getPlayer(player.getUniqueId());

                labyModPlayer.disableAddons(addonsToDisable);
                requestAddons(player);
                player.sendMessage(ChatColor.RED + "LabyMod Integration has been enabled, due to the server rules Minimap addon has been disabled on this gamemode.");
            }
        }, this);
    }

Exception or Error

N/A

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions