Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
[Question] Handlers
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 102
- Joined: Wed Sep 02, 2009 11:10 pm
Re: [Question] Handlers
yes they do...brutus wrote:Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
a func requiers a return false or return true and this cant be done on void.
- brutus
- Posts: 325
- Joined: Sat Nov 10, 2007 4:18 pm
- Location: Bulgaria
Re: [Question] Handlers
can u show me an example? which function uses thes booleansLee wrote:yes they do...brutus wrote:Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
a func requiers a return false or return true and this cant be done on void.
boolean methods are used to return false/true somewhere but in this case there isnt any other method that use them as check i didnt find any
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: [Question] Handlers
probably it was used with a return value some time before, so that the methods have now their boolean return values, but they are nowhere used. that is not an error, is done normally. (e.g. the boolean return value of executeUpdate of an sql query is mostly also not used). it is just about making a possibility for checking if the admin command went wrong or good and to check it somewhere else - can be done, but dont have to be done.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- brutus
- Posts: 325
- Joined: Sat Nov 10, 2007 4:18 pm
- Location: Bulgaria
Re: [Question] Handlers
yep its what i thought that they were used before but right now they arent.. i am pretty sure that changing them to void methods wont increase/decrease the performance but it will be just more clean 
