Geitenijs / CommandBlocks

The most versatile plugin for assigning commands to blocks!
Other
1 stars 0 forks source link

java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because the return value of "org.bukkit.configuration.file.FileConfiguration.getString(String)" is null #19

Closed VacAge closed 10 months ago

VacAge commented 10 months ago

Describe the bug does not see the command of another plugin

To Reproduce Steps to reproduce the behavior:

  1. Create a command via MyCommand
  2. set commands: - console: - command
  3. See error

Expected behavior Executing a command

Environment (please complete the following information):

Geitenijs commented 10 months ago

That doesn't work unfortunately, since MyCommand doesn't actually register commands. Just run those 4 commands directly from command blocks! They can be copy-pasted

VacAge commented 10 months ago

That doesn't work unfortunately, since MyCommand doesn't actually register commands. Just run those 4 commands directly from command blocks! They can be copy-pasted

MyCommand has a command registration option and when I turned it on everything worked, but your plugin still throws an error image

VacAge commented 10 months ago

I ask you to fix the error that is being issued in vain, as the command is being executed, but I would not like to constantly see the error

Geitenijs commented 10 months ago

Post your full blocks.yml file, there might be some other issue going on here

VacAge commented 10 months ago
chest_trap_1:
  location: -7395#24#-4875#World-Excalibur
  success:
    commands:
      console:
      - /chest_trap_1
  permission:
    value: excalibur.chest.trap
    messages:
    - '&cYou don`t have perms'
Geitenijs commented 10 months ago

pls go to your blocks.yml file, copy everything (the entire file) and paste it to pastebin

VacAge commented 10 months ago

blocks.yml - https://pastebin.com/vmkG1kuv Server: server

Geitenijs commented 10 months ago

that can't be your entire blocks file. all the comments are gone, and so is the file structure https://pastebin.com/TYRrvJJb

this is how it should look. you can't simply delete the unused areas. please regenerate your blocks file and you should be good to go!

VacAge commented 10 months ago

https://pastebin.com/Qfetd4fu So? Now nothing happens at all, no errors and nothing happens

VacAge commented 10 months ago

I have solved everything and fixed it. Thank you very much for the explanation! And for your time <3

Geitenijs commented 10 months ago

You're welcome! :)