DevLeoko / AdvancedBan

AdvancedBan is a Spigot plugin to manage punishments on single servers and server networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When called from the API, "this.mi" is null

ichiru5555 opened this issue · comments

What version of AdvancedBan (/AdvancedBan) are you using?
2.3.0

What kind of server do you have (Bungeecord/single server)?
bungeecord

What server version (/version) are you using?
latest

Any error/log post it through pastebin.com and link it here. (Also include /plugins/AdvancedBan/logs/latest.log)
Cannot invoke "me.leoko.advancedban.MethodInterface.log(String)" because "this.mi" is null

Add any additional information below.
I want to run getMute from the API, but I get the error "Cannot invoke "me.leoko.advancedban.MethodInterface.log(String)" because "this.mi" is null".
Can you tell me how to solve this?

This is caused by incorrect maven pom.xml settings, ensure you're not shading/including advancedgui into your exported jar.

I have not included Advancedgui in the dependencies in pom.xml.

How have you included advancedban then?

<dependency> <groupId>com.github.DevLeoko</groupId> <artifactId>AdvancedBan</artifactId> <version>v2.3.0</version> </dependency>

That is including advancedban through the pom.xml.

Take a look at https://howtodoinjava.com/maven/maven-dependency-scopes/ to understand how to set scopes on maven dependencies.

Was it wrong to write the code written in README.md in pom.xml?

Was it wrong to write the code written in README.md in pom.xml?

It does not have the scope set as I've provided above, you need to include that in order to tell maven to not include the actual advancedban jar into the compiled jar.

Is the error "Cannot invoke "net.md_5.bungee.protocol.MinecraftEncoder.getProtocol()" because the return value of "io.netty.channel.ChannelPipeline.get(java.lang.Class)" is null" coming from AdvancedBan?

What is the full stacktrace/full error? There should be more to it

If you need quicker help, you could also join our discord @ https://discord.gg/zycVCTn67K

No, it was only this one sentence.

There should be more, otherwise cant tell if it is or not

I would like to mute it, is the following code correct?
manager.getPunishments(player.getUniqueId().toString(), PunishmentType.MUTE, true);

That is not correct, take a look at the uuid manager

I once again suggest asking through our discord for better support.

Thank you