Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with api #48

Open
FiLKoNd opened this issue Jul 12, 2023 · 1 comment
Open

Help with api #48

FiLKoNd opened this issue Jul 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@FiLKoNd
Copy link

FiLKoNd commented Jul 12, 2023

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

@FiLKoNd FiLKoNd added the bug Something isn't working label Jul 12, 2023
@silverwolfg11
Copy link
Collaborator

Hi, sorry for the really late response.

I'm not able to reproduce this issue. Some followup questions: are you shading in MapTowny into your jar? Are you depending on the maptowny-api?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants