Wanting to create a currency item that when a player right clicks, executes a deposit command

Wanting to use it for kits, and make it consume the item when used
Solution:
But I was able to figure it out by using https://modrinth.com/mod/itemcommander in conjuction with Impactor
Jump to solution
7 Replies
Litning11
Litning112d ago
Do you currently have any custom item plugins? I use ItemsAdder but Nexo should also be able to do this I have an item that does similar, I'll send the config here.
gold_coins100:
enabled: true
display_name: '&6&l10,000 Gold'
lore:
- ' '
- '&7A small pile of gold coins.'
- ' '
- '&eRight-click to collect &6&l10,000G'
resource:
generate: true
material: PAPER
textures:
- misc/pile_of_coins.png
events:
interact:
right:
cancel: true
decrement_amount:
amount: 1
execute_commands:
bonus_claim:
command: 'cmi money give {player} 10000'
as_console: true
play_particle:
name: HEART
play_sound:
name: entity.experience_orb.pickup
volume: 1
pitch: 1
gold_coins100:
enabled: true
display_name: '&6&l10,000 Gold'
lore:
- ' '
- '&7A small pile of gold coins.'
- ' '
- '&eRight-click to collect &6&l10,000G'
resource:
generate: true
material: PAPER
textures:
- misc/pile_of_coins.png
events:
interact:
right:
cancel: true
decrement_amount:
amount: 1
execute_commands:
bonus_claim:
command: 'cmi money give {player} 10000'
as_console: true
play_particle:
name: HEART
play_sound:
name: entity.experience_orb.pickup
volume: 1
pitch: 1
Then just replace the command with whatever economy plugin you use @Jetex
Jetex
JetexOP2d ago
Fabric <---
Litning11
Litning112d ago
Oh I misread, this is a modded server software right?
Solution
Jetex
Jetex2d ago
But I was able to figure it out by using https://modrinth.com/mod/itemcommander in conjuction with Impactor
Jetex
JetexOP2d ago
Gonna mark this as solved^
Litning11
Litning112d ago
My bad :frpensive:
Jetex
JetexOP2d ago
All G^

Did you find this page helpful?