How to fix this error when my piston runs?


#1

That piston worked for months and strangely it stopped working when I did 0 changes

An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object


#2

Do you have a copy of the piston? Do you know which part of the piston triggered that error?


#3

It’s a simple piston that says if the switch is on then turn 2 lights off

And then turn the switch off


#4

Again, you may want to post an image of the piston and logs. That way, we can better examine and hopefully provide you with some feedback. Right now, we basically do not have enough info to offer any insight into your situation.


#5

@jkp is right we need more info.
All I can share at this point is, once something weird happened to my most simple piston (if motion lights ON, no motion for 15 seconds, lights OFF)
it just stopped working. I tried everything. Finally I deleted and re-wrote the piston and worked.