Skip to content

Commit

Permalink
fix dupe bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KamillPlayZ committed Nov 27, 2024
1 parent 8f51d98 commit d7b4f97
Show file tree
Hide file tree
Showing 97 changed files with 125 additions and 7,783 deletions.
46 changes: 25 additions & 21 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 0 additions & 132 deletions Core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,144 +185,18 @@
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_20_r2</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_20_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_19_r3</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_19_r2</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_19_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_18_r2</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_18_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_17_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_16_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_16_r2</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_16_r3</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_15_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_14_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_13_r2</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_13_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_12_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_11_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_10_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_9_r2</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_9_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_8_r3</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_21_r1</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_20_r4</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>xzot1k.plugins.ds</groupId>
<artifactId>v1_21</artifactId>
Expand All @@ -349,12 +223,6 @@
<version>12.9.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>

</dependencies>

Expand Down
14 changes: 0 additions & 14 deletions Core/src/main/java/xzot1k/plugins/ds/DisplayShops.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
import me.arcaniax.hdb.api.HeadDatabaseAPI;
import me.devtec.shared.Ref;
import me.devtec.shared.versioning.VersionUtils;
import org.bstats.bukkit.Metrics;
import org.bstats.charts.SimplePie;
import org.bstats.charts.SingleLineChart;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
Expand Down Expand Up @@ -254,17 +251,6 @@ public void onEnable() {
else if (isOutdated())
log(Level.INFO, "There seems to be a different version on the Spigot resource page '"
+ getLatestVersion() + "'. You are currently running '" + getDescription().getVersion() + "'.");

Metrics m = new Metrics(getPluginInstance(), 23070);
m.addCustomChart(new SingleLineChart("shop_amount",()->getManager().getShopMap().size()));
m.addCustomChart(new SimplePie("modern_displays",()->displayManager!=null?"true":"false"));
m.addCustomChart(new SimplePie("claimable_system",()->getConfig().getBoolean("claimable-system",false)?"true":"false"));
if(papi!=null)
m.addCustomChart(new SingleLineChart("placeholderapi_requests",()->placeholderAPI));
m.addCustomChart(new SingleLineChart("item_sells",()->itemSells));
m.addCustomChart(new SingleLineChart("item_buys",()->itemBuys));
m.addCustomChart(new SingleLineChart("menu_opens",()-> menuOpens));
m.addCustomChart(new SimplePie("sql_saving_system",()->isSQL?"true":"false"));
}

public static int menuOpens = 0;
Expand Down
7 changes: 4 additions & 3 deletions Core/src/main/java/xzot1k/plugins/ds/api/DManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package xzot1k.plugins.ds.api;

import de.tr7zw.changeme.nbtapi.NBTItem;
import me.devtec.shared.Ref;
import net.md_5.bungee.api.ChatColor;
import org.apache.commons.lang.WordUtils;
Expand Down Expand Up @@ -1500,12 +1501,12 @@ public boolean hasBlockedNBT(@NotNull ItemStack itemStack) {
if (itemStack.getType() == Material.AIR || itemStack.getAmount() == 0) return false;

// TODO fix
/* try {
try {
// ensure blocked nbt is not on the item
de.tr7zw.changeme.nbtapi.NBTItem nbtItem = new de.tr7zw.changeme.nbtapi.NBTItem(itemStack);
NBTItem nbtItem = new NBTItem(itemStack);
List<String> blockedNbtList = getPluginInstance().getConfig().getStringList("blocked-nbt-list");
return blockedNbtList.stream().anyMatch(nbtItem::hasKey);
} catch (Exception ignored) {}*/
} catch (Exception ignored) {}
return false;
}

Expand Down
2 changes: 2 additions & 0 deletions Core/src/main/java/xzot1k/plugins/ds/core/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public void onInteract(PlayerInteractEvent e) {
return;
}

e.setCancelled(true);

// ensure blocked nbt is not on the item
if (getPluginInstance().getManager().hasBlockedNBT(handItem)) {
String message = getPluginInstance().getLangConfig().getString("set-item-blocked");
Expand Down
Loading

0 comments on commit d7b4f97

Please sign in to comment.