Is there such a listener or is this a call for API request?
Split stack event?
-
- English
- yahwho
- Thread is marked as Resolved.
-
-
Unfortunately no and using the split stack trick you can steal stuff from protected areas.
This is something that has to be patched on the game itself.
-
Hehe yes I didn't want to mention why I needed it!
That said, is there a way to disable mouse input listeners by button?
-
And when you say fix, you mean only allow split stack in your own inventory? That would solve the problem!
-
When i said fix i meant the split part to be included in the chestToInventory event for instance so that you can stop people from taking things this way.
Not sure about the listeners and i am nowhere close to a pc for the next two weeks to check myself
-
Hmm well my requirement isn't for taking from a protected area (my protection plugin stops you even viewing the contents of a protected chest) so no stealing there.
My problem is somewhat different but still requires the ability to check if a stack have been split. I've been looking through the API for a while now but can't seem to see anything that would do the job.
I take it Mino you're sunning yourself on a beach somewhere?
-
Unfortunately no and using the split stack trick you can steal stuff from protected areas.
Hmm... what do you mean exactly? Do you mean splitting a stack while moving it from inventory to chest (or vice versa)? When talking about "stealing stuff from protected areas", do you refer to the old Lua AP script, or Miwarres' AP plugin?
When i said fix i meant the split part to be included in the chestToInventory event
Basically this case should be covered by the PlayerChestToInventory event The only limitation is that this event does not provide any information about how many items were moved to the inventory, so it's impossible to distinguish regular item exchanges from stack exchanges. This will change with the next update (more precisely, a function will be added to find out how many items were moved)^^
My problem is somewhat different but still requires the ability to check if a stack have been split. I've been looking through the API for a while now but can't seem to see anything that would do the job.
Do you need this to find out if a stack has been splitted "inside" the inventory/chest (i.e. the new stack still remains in the inventory/chest), or is it just relevant when moving the new stack from the inventory to a chest (or vice versa)?
-
Do you need this to find out if a stack has been splitted "inside" the inventory/chest (i.e. the new stack still remains in the inventory/chest), or is it just relevant when moving the new stack from the inventory to a chest (or vice versa)?
Good morning Red, It relevant for when moving and splitting a new stack from inventory to chest as well as chest to inventory.
So the following methods
What is happening is it is creating illegal states (amongst other things). You will actually get kicked from the server with a "you are using modified files" warning.
When you drag a stack from inventory to chest and try to stack an existing item in the chest (with right click) you also get a a graphic glitch
I am using:
to detect the exchanged stack size, but when a stack is split with right click I have no means to detect that this has happened. I.e. the exchange is actually 1 instead of say 64 -
What is happening is it is creating illegal states (amongst other things). You will actually get kicked from the server with a "you are using modified files" warning.
Oh, I see... we will fix this issue ASAP
I am using:
event.getItem().getStacksize();The next update will provide a method to determine how many items were actually moved
-
As always, awesome!
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!