Skip to content

Commit

Permalink
The item that value is zero will no longer appear in the acquire list
Browse files Browse the repository at this point in the history
  • Loading branch information
Tining123 committed Mar 21, 2022
1 parent 23a3477 commit 839862a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.Tining</groupId>
<artifactId>DemonMarket</artifactId>
<version>1.2.8</version>
<version>1.2.9</version>
<build>
<plugins>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/tining/demonmarket/gui/AcquireListGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ private static void drawPage(Inventory inventory, int pageNum, Player player) {

List<ItemStack> list = new ArrayList<>();
nbtWorth.forEach((s, aDouble) -> {
if (!Objects.isNull(s) && !Objects.isNull(PluginUtil.getItemStackFromSaveNBTString(s))) {
if ( aDouble != 0 && !Objects.isNull(s) && !Objects.isNull(PluginUtil.getItemStackFromSaveNBTString(s))) {
ItemStack is = PluginUtil.getItemStackFromSaveNBTString(s);
is.setItemMeta(getNBTPriceLore(is,player));
list.add(is);
}
});
worth.forEach((s, aDouble) -> {
if (!Objects.isNull(s) && !Objects.isNull(PluginUtil.getItem(s))) {
if ( aDouble != 0 && !Objects.isNull(s) && !Objects.isNull(PluginUtil.getItem(s))) {
ItemStack is = PluginUtil.getItem(s);
is.setItemMeta(getPriceLore(is,player));
list.add(is);
Expand All @@ -127,7 +127,7 @@ private static void drawPage(Inventory inventory, int pageNum, Player player) {
inventory.clear();
set = true;
}
inventory.setItem(i % VIEW_SIZE, list.get(i));
inventory.setItem(move % VIEW_SIZE, list.get(i));
move++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: DemonMarket
main: com.tining.demonmarket.Main
version: 1.2.8
version: 1.2.9
api-version: 1.13
# YAML 中的注释,一行有效
# 以上是插件基本信息,以下是命令注册
Expand Down

0 comments on commit 839862a

Please sign in to comment.