-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow selling items to an shop. Checked full inventories. #1
base: master
Are you sure you want to change the base?
Conversation
Nice work, I'll review this, test it, and merge 👍 |
public static final Key<Value<Boolean>> IS_SPONGY_CHEST = KeyFactory.makeSingleKey(Boolean.class, Value.class, DataQuery.of("IsSpongyChest")); | ||
public static final Key<Value<UUID>> UUID_CHEST = KeyFactory.makeSingleKey(UUID.class, Value.class, DataQuery.of("UUIDChest")); | ||
public static final Key<Value<ItemStackSnapshot>> ITEM_CHEST = KeyFactory.makeSingleKey(ItemStackSnapshot.class, Value.class, DataQuery.of("ItemChest")); | ||
public static final Key<Value<Double>> PRICE_CHEST = KeyFactory.makeSingleKey(Double.class, Value.class, DataQuery.of("PriceChest")); | ||
public static final Key<ListValue<Double>> PRICES_CHEST = KeyFactory.makeListKey(Double.class, DataQuery.of("PricesChest")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will break all previous SpongyChest
shops.
@Zartec Looking over this it seems like you made it so all shops are both |
This is possible over: If the sell price is |
Reverted the dataquery key to the previous |
70250e7
to
52ed976
Compare
Allows players to create shops on which items can be sold and bought.
Also shops which only sells or only buys are possible.
Also the inventories of the chest and the player are checked for free space, because sponge inserts the items to the armor slots if there is no more space.
Left click sells items if you are not the owner and you don`t have the destroy permission
The command is changed to:
[] -> required
<> -> optional
/spongychest setshop [sellprice] <[buyprice]>
/spongychest setshop <-s sellprice> <-b buyprice>
/spongychest setshop <--sell-price=sellprice> <--buy-price=buyprice>