Skip to content

Help with api #48

@FiLKoNd

Description

@FiLKoNd

Describe the Bug

Expected Behavior

I can't register custom tooltip replacements.
Log:
java.lang.ClassCastException: class me.silverwolfg11.maptowny.MapTowny cannot be cast to class me.silverwolfg11.maptowny.MapTownyPlugin (me.silverwolfg11.maptowny.MapTowny is in unnamed module of loader 'maptowny-2.2.0.jar' @35e6ff92; me.silverwolfg11.maptowny.MapTownyPlugin is in unnamed module of loader 'Town-Buy.jar' @73c8de3d)

Code:

   private void setupDynMap(){
        Plugin plugin = Bukkit.getPluginManager().getPlugin("MapTowny");
        if(plugin != null){
            MapTownyPlugin mapTownyPlugin = (MapTownyPlugin) plugin;
            mapTownyPlugin.getLayerManager().registerReplacement("town_price",
                (town) -> townsConfig.getTownPrice(town).toString());
        }
        else MessageUtils.msgToConsole("&cMapTowny не обнаружен.");
    }

Plugin Version

2.2.0

Towny Version

Towny-0.99.5.0

DynMap Version

Dynmap-3.6-spigot

Server Software Version

Paper 1.19.4#72

Additional Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginactiveUsed to mark items that will be closed soon due to inactivity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions