Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Paradox
« on: April 03, 2013, 06:10:19 pm »

I can easily implement a plugin that'll prevent people form being able to pick up items out of an anvil or whatnot if it's not meant suppose to be stacked. I think making it so that it "drops the items" on ground so the player can pick it up will be the tricky part. Thanks for the array, I'll see what I can do right now.


EDIT: Wait. do you want this so that if a person tries to take something out of an avil that it doesn't allow them? Or do you want it so if they have something they shouldn't have stacked in their inventory, it throws it on the ground? The second is much much easier and seems to make more sense to me.
Posted by: 1cec0ld
« on: April 03, 2013, 11:28:16 am »

In response to the "duplicated" thread, in Problems, I tried to make a plugin that, when an item is clicked (InventoryClickEvent) the plugin checks if the itemid is part of the Not Allowed To Be Stacked List
Code: [Select]
int[] notAllowed = {310,311,312,313,
298,299,300,301,
302,303,304,305,
306,307,308,309,
314,315,316,317,
272,273,274,275,
276,277,278,279,
283,284,285,286,
267,256,257,258,
290,291,292,293,294,
261};

And if the amount is greater than one, simply drop the items individually at the player's feet to be picked up naturally.
I failed. Paradox, if you could possibly handle this, please do. Unless yall can think of a better solution.