Skip to content

Plugin is not working

Robin edited this page Jun 23, 2020 · 27 revisions

If you get nullpointerexceptions in the console while the server is running, when using plugin commands, etc. restart the server. These errors happen when the plugin failed to load, so have a look at the console for any errors at startup. It's probably one of the errors below.

If you get MalformedJsonException, Use JsonReader.setLenient(true) to accept malformed JSON, Not a JSON Object: null, etc. follow the instructions below

  • For the v2 plugin, you must be using the latest version of NamelessMC v2 (currently v2-pre7)
  • Make sure the api is enabled in the control panel
  • Make sure that legacy api is disabled
  • The API url should be in this format: http(s)://yoursite.com/index.php?route=/api/v2/API_KEY. NamelessMC versions older than v2-pre7 provide the api url in this format http(s)://yoursite.com/v2/API_KEY which does not always work.
  • Go to the address in your browser. Does it work? If it says "invalid api method" somewhere it works. If it works in your browser but not from the plugin, you are probably using cloudflare or some other ddos prevention system:
  • Are you using CloudFlare? Either use the non-CloudFlare webserver address in config.yml, or find a way to exempt plugin requests from CloudFlare checks. This CloudFlare support page may help. Example by KentuckyFriedData in discord
  • If you are getting MalformedJsonException: Use JsonReader.setLenient(true) errors but not using cloudflare it's probably your webhost messing with the plugin's requests.
  • Restart your server, maybe it was an old error