My problem is actually very simple but I couldn't find a solution. I am making a market system, I designed a chest gui that can earn money by selling items and each person has a chest where they can market their own items. With a command like /shop look <player>, whatever, I set everything, like how the player will sell their items. I made a command, for example /shop sell <price> with this command you can sell the number of items you have with the price of each item. For example, let's say there is 1.5 stacks of wood, in this case it will be separated as 64 and 32. When I want to sell it, I sell it, but it is stored differently in the list. When I make a list of the items the user sells, I should only get oak_planks = 1, but I get the following output. oak_planks:0*64 = 1, oak_planks:0*32 = 1, in short, it perceives them differently. However, when I transfer them to the chest gui, I only need to get them as oak_planks.
In short, I want to get the name of the items, for example oak_planks, not oak_planks:0*45 or something like that. Because when I print them, I print accordingly. I left a part of my code below. Here I get a result like oak_planks:0*xx as output.
In short, I want to get the name of the items, for example oak_planks, not oak_planks:0*45 or something like that. Because when I print them, I print accordingly. I left a part of my code below. Here I get a result like oak_planks:0*xx as output.
Code:
if player's tool is not air:
if arg-2 is set:
set {_amount} to amount of player's tool
send "players tool : %{_a}%, amount : %{_amount}%" to player
marketAddItem(player,player's tool)