Sharpjaws / SharpSK

An addon for Skript that adds lots of features and other features from your favourite plugins to skript. Supports 1.8 up to 1.12
https://forums.skunity.com/resources/72
MIT License
8 stars 12 forks source link

set {_lvl}(as java.lang.Object) to [mcmmo] %player%'s powerlevel #10

Closed Sollembum78 closed 7 years ago

Sollembum78 commented 7 years ago

I have latest of SharpSK, one of recent Skript from Bensku. And also pre-latest spigot 1.11.2.

I use this addon to check player's mcMMO powerlevel and deny some actions, it goes like this: set {_lvl} to mcmmo powerlevel of player if {_lvl} < 300: do stuff... And it works fine, I see no actual problems in game. But! Each time I use commands like /list from essentials and some others, my console gets this error: https://pastebin.com/ZUq2Lvh6

Is it something critical? Why does it happen? Does it affect anything?

Sharpjaws commented 7 years ago

It is not really particularly a really big problem. From the logs a NullPointerException is thrown meaning that there was no player found to check the power level of. That's why "null" was returned causing this exception. It's an easy one to fix.

Sollembum78 commented 7 years ago

Is it because some commands I execute from console, so no players are in that event? I think it may be that. But! In my script with mcmmo I check for block place and break, not executing commands. Anyway, if it's not something bad, I think I can live with it, thanks :)

Sharpjaws commented 7 years ago

Possibly, however It's quite strange how it get triggered upon executing specific commands for some reason. I might want to look into that one. Anyway no problem.