Search in sources :

Example 1 with ServerboundListItemsRequestPacket

use of com.almuradev.almura.feature.store.network.ServerboundListItemsRequestPacket in project Almura by AlmuraDev.

the class ClientStoreManager method requestListBuyingItem.

/**
 * BuyingItem
 */
public void requestListBuyingItem(final String id, final VanillaStack stack, final int index, final BigDecimal price) {
    checkNotNull(id);
    checkNotNull(stack);
    checkState(index >= 0);
    checkNotNull(price);
    checkState(price.doubleValue() >= 0);
    this.network.sendToServer(new ServerboundListItemsRequestPacket(id, StoreItemSegmentType.BUYING, Lists.newArrayList(new ServerboundListItemsRequestPacket.ListCandidate(stack, index, price))));
}
Also used : ServerboundListItemsRequestPacket(com.almuradev.almura.feature.store.network.ServerboundListItemsRequestPacket)

Example 2 with ServerboundListItemsRequestPacket

use of com.almuradev.almura.feature.store.network.ServerboundListItemsRequestPacket in project Almura by AlmuraDev.

the class ClientStoreManager method requestListSellingItem.

/**
 * SellingItem
 */
public void requestListSellingItem(final String id, final VanillaStack stack, final int index, final BigDecimal price) {
    checkNotNull(id);
    checkNotNull(stack);
    checkState(index >= 0);
    checkNotNull(price);
    checkState(price.doubleValue() >= 0);
    this.network.sendToServer(new ServerboundListItemsRequestPacket(id, StoreItemSegmentType.SELLING, Lists.newArrayList(new ServerboundListItemsRequestPacket.ListCandidate(stack, index, price))));
}
Also used : ServerboundListItemsRequestPacket(com.almuradev.almura.feature.store.network.ServerboundListItemsRequestPacket)

Aggregations

ServerboundListItemsRequestPacket (com.almuradev.almura.feature.store.network.ServerboundListItemsRequestPacket)2