Closed LinoxGH closed 5 years ago
Did the requested changes.
Not all.
Now all.
I am not sure if they are related to my changes but issues #8 and #9 seem like fixed too.
I tried to replicate them in my build but I couldn't.
Removed the comment and tried to replicate the issue #7 too but it seems that it has been fixed already before in Barrel.java(373:9)
Okay, could you please remove the redundant return-statement too?
Is it redundant though? I mean if we don't return true in there it'll return false afterwards.
Yeah but as I said to you before. You added it twice... You have two return true; statements after another...
Oh now I see what you meant with the return false; Sorry, I was looking at the wrong return-statement;
We still only need one return true; statement at the very end though.
So we return true whatever happens? Even if the block isn't a barrel owned by the player and the item isn't an ID Card?
No... The statement at the very top already checks that the item was an ID card. Otherwise it returns false...
So we can return true; afterwards, no matter what.
Ah it's my fault. I always thought the boolean parts of handlers was like the boolean part of CommandExecutor.(You need to return true if you did sth successfully.)
Nah, it's a messy system.
True = This Action was handled False = This Action is not applicable
On right click it loops through all Handlers until one return true.
Return statements should be better now.