ItemJoin

ItemJoin

157k Downloads

[Support] To get an item twice

momoservertw opened this issue ยท 8 comments

commented

Do it possible to get a item if I already have one?
Like a flag which can identify that item??
I think ItemJoin is more powerful than most of custom item plugin. haha

ItemJoin version: 4.9 (build #147 latest)
Spigot Version: git-Spigot-642f6d2-fbe3046 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

commented

I have added the requested features,
The always-give itemflag;
always-give - adding this itemflag will tell ItemJoin to always give the set amount of the item each time the players acts upon a trigger (join, respawn, world-change, region-enter) whichever triggers are defined for that item. This itemflag also allows the bypass of the original hasItem restriction for /itemjoin get [item] and /itemjoin get [item] [player] when no amount is specified.

I have also added the ability to give items to a player if they already have it via;
/itemjoin get [item] [player] [amount]
/itemjoin get [item] [amount]
(If all you are wanting to do is give a player one of the item then set the amount to 1 and it will "add" 1 to the players inventory even if it already exists).

Normally I would link the fixed snapshot and say it is safe to download, however, this feature has been pushed to the dev-branch that contains the new framework for ItemJoin which is extremely experimental and once complete will be uploaded for release on ItemJoin's spigot/bukkit pages.

So, for now, I will say this feature has been added and if you are interested in testing it you can try the latest snapshot in the dev-branch linked below. However, this is not recommended to use on public servers and should be used in a testing environment only, otherwise do so at your own risk.

I will post back and close this issue once the full release is posted on ItemJoin's download pages.
ItemJoin v3: Build No.14
Snapshot dev-branch; http://ci.craftationgaming.com/job/ItemJoin%20v3/

commented

This feature has been officially added in the release of ItemJoin v5.0.0.
You can grab it here; https://www.spigotmc.org/resources/itemjoin.12661/download?version=254090

Please read the changelog as the documentation has not been updated yet;
https://www.spigotmc.org/wiki/recent-changes

commented

So basically you want to be able to continue to get the item every time you join even though you already have the max count? So say on join the itemflag "always-give" will give the "count" of the item to the player each time.

Thanks so much for the donation btw, I have added you to the front page of ItemJoin.

commented

This is just my a littile appreciation, thanks.

Sorry, my English is not good.
I mean, can I get the item again, if one already exists in the player's inventory?

For example, using command "/ij get ExampleItem PlayerName".
To give one item to the player.
And get him again, then he will get two of it.

After I use the command twice, it will display "You already have the item [ExampleItem]!". Then no items will be given.

Besides, I have 27 custom items, except the Main Menu. I use most of them as reward items.
Because it is so convenient, with continuous giving, death disappears, disposable, all custom item features and powerful plugins support.
If ItemJoin has this feature, it would be great!

commented

Ahhh okay I see, so then my question is do you want a feature such as a command (so you have control over if the player gets the item again if he already has it) like; /itemjoin get which will NOT limit you if you already have the item or would you want a itemflag or such that you can attach to the specified item so you can always-give that item?

I ask because I was actually already requested for the /itemjoin get idea which is currently in the programming process.

commented

I think both of them are good. But adding a item flag may be better, because it can directly distinguish the item that for menu or a custom item.

The difference between the two is whether other types of trigger can be used. For example, a RPG map can use the trigger of region-entry to get the supplies every level. Further, there will be no restrictions when there are more trigger types.

This is my idea. If it is a big project, then the first method is enough.

commented

Okay, I will add both these features in a snapshot and post back here when it is available.
This will be officially added to the release of v5.0.0

commented

Wow
I can look forward to the new features of ItemJoin!
Thank you. ^_^