well you could do this with packets hack..
In your inventory you have (40?) slots or something idonno... anyway some objects takes up 4 slots. but by changing the packets witch gets sent to the server of witch slot to put it in you can fool it to put it in only 1 slot.
Its alot of job for this function. You would need to decrypt the packets and resend it crypted and modefied. And yes.. this is the way to dupe items aswell...

well.. almost