This commit is contained in:
rockyhawk64 2024-08-11 12:10:33 +10:00
parent a27360f8ff
commit 15766dca58
7 changed files with 19 additions and 33 deletions

View File

@ -46,16 +46,16 @@
<option name="name" value="Maven Central repository" /> <option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" /> <option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository> </remote-repository>
<remote-repository>
<option name="id" value="BenCodez Repo" />
<option name="name" value="BenCodez Repo" />
<option name="url" value="https://nexus.bencodez.com/repository/maven-public/" />
</remote-repository>
<remote-repository> <remote-repository>
<option name="id" value="phoenix" /> <option name="id" value="phoenix" />
<option name="name" value="phoenix" /> <option name="name" value="phoenix" />
<option name="url" value="https://nexus.phoenixdevt.fr/repository/maven-public/" /> <option name="url" value="https://nexus.phoenixdevt.fr/repository/maven-public/" />
</remote-repository> </remote-repository>
<remote-repository>
<option name="id" value="BenCodez Repo" />
<option name="name" value="BenCodez Repo" />
<option name="url" value="https://nexus.bencodez.com/repository/maven-public/" />
</remote-repository>
<remote-repository> <remote-repository>
<option name="id" value="ess-repo" /> <option name="id" value="ess-repo" />
<option name="name" value="ess-repo" /> <option name="name" value="ess-repo" />

21
pom.xml
View File

@ -91,10 +91,6 @@
<id>jeff-media-public</id> <id>jeff-media-public</id>
<url>https://hub.jeff-media.com/nexus/repository/jeff-media-public/</url> <url>https://hub.jeff-media.com/nexus/repository/jeff-media-public/</url>
</repository> </repository>
<repository>
<id>BenCodez Repo</id>
<url>https://nexus.bencodez.com/repository/maven-public/</url>
</repository>
<repository> <repository>
<id>ess-repo</id> <id>ess-repo</id>
<url>https://repo.essentialsx.net/releases/</url> <url>https://repo.essentialsx.net/releases/</url>
@ -126,7 +122,7 @@
<dependency> <dependency>
<groupId>de.tr7zw</groupId> <groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId> <artifactId>item-nbt-api</artifactId>
<version>2.13.1-SNAPSHOT</version> <version>2.13.2</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -164,12 +160,6 @@
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>2.13.0</version> <version>2.13.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.bencodez</groupId>
<artifactId>votingplugin</artifactId>
<version>LATEST</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>me.clip</groupId> <groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId> <artifactId>placeholderapi</artifactId>
@ -197,14 +187,13 @@
<dependency> <dependency>
<groupId>com.github.Realizedd</groupId> <groupId>com.github.Realizedd</groupId>
<artifactId>TokenManager</artifactId> <artifactId>TokenManager</artifactId>
<version>LATEST</version> <version>3.2.4</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>*</groupId> <groupId>*</groupId>
<artifactId>*</artifactId> <artifactId>*</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.arcaniax</groupId> <groupId>com.arcaniax</groupId>
@ -212,6 +201,12 @@
<version>1.3.1</version> <version>1.3.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.github.LoneDev6</groupId>
<artifactId>api-itemsadder</artifactId>
<version>3.6.1</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>io.papermc</groupId> <groupId>io.papermc</groupId>
<artifactId>paperlib</artifactId> <artifactId>paperlib</artifactId>

View File

@ -1,4 +1,4 @@
version: 3.21.3.3 version: 3.21.3.4
main: me.rockyhawk.commandpanels.CommandPanels main: me.rockyhawk.commandpanels.CommandPanels
name: CommandPanels name: CommandPanels
author: RockyHawk author: RockyHawk

View File

@ -1,6 +1,5 @@
package me.rockyhawk.commandpanels; package me.rockyhawk.commandpanels;
import com.bencodez.votingplugin.VotingPluginHooks;
import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap;
import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.api.item.NBTItem;
import me.rockyhawk.commandpanels.api.CommandPanelsAPI; import me.rockyhawk.commandpanels.api.CommandPanelsAPI;
@ -77,7 +76,6 @@ import java.io.Reader;
import java.util.*; import java.util.*;
public class CommandPanels extends JavaPlugin{ public class CommandPanels extends JavaPlugin{
public VotingPluginHooks votingPlugin;
public YamlConfiguration config; public YamlConfiguration config;
public Economy econ = null; public Economy econ = null;
public boolean openWithItem = false; //this will be true if there is a panel with open-with-item public boolean openWithItem = false; //this will be true if there is a panel with open-with-item
@ -246,10 +244,6 @@ public class CommandPanels extends JavaPlugin{
if (!Bukkit.getVersion().contains("1.8")) { if (!Bukkit.getVersion().contains("1.8")) {
this.getServer().getPluginManager().registerEvents(new SwapItemEvent(this), this); this.getServer().getPluginManager().registerEvents(new SwapItemEvent(this), this);
} }
//if VotingPlugin is enabled
if (getServer().getPluginManager().isPluginEnabled("VotingPlugin")) {
votingPlugin= VotingPluginHooks.getInstance();
}
//if plugin ChestSort is enabled //if plugin ChestSort is enabled
if(getServer().getPluginManager().isPluginEnabled("ChestSort")){ if(getServer().getPluginManager().isPluginEnabled("ChestSort")){
this.getServer().getPluginManager().registerEvents(new UtilsChestSortEvent(this), this); this.getServer().getPluginManager().registerEvents(new UtilsChestSortEvent(this), this);

View File

@ -1,6 +1,5 @@
package me.rockyhawk.commandpanels.classresources.placeholders; package me.rockyhawk.commandpanels.classresources.placeholders;
import com.bencodez.votingplugin.VotingPluginHooks;
import com.earth2me.essentials.Essentials; import com.earth2me.essentials.Essentials;
import me.realized.tokenmanager.api.TokenManager; import me.realized.tokenmanager.api.TokenManager;
import me.rockyhawk.commandpanels.CommandPanels; import me.rockyhawk.commandpanels.CommandPanels;
@ -424,11 +423,6 @@ public class Placeholders {
return Long.toString(api.getTokens(p).orElse(0)); return Long.toString(api.getTokens(p).orElse(0));
} }
} }
if (plugin.getServer().getPluginManager().isPluginEnabled("VotingPlugin")) {
if(identifier.equals("votingplugin-points")) {
return String.valueOf(VotingPluginHooks.getInstance().getUserManager().getVotingPluginUser(p).getPoints());
}
}
//end nodes with PlaceHolders //end nodes with PlaceHolders
return ""; return "";
} }

View File

@ -56,7 +56,7 @@ public class CommandRunner {
} }
} }
public void runMultiPaywall(Panel panel, PanelPosition position, Player p, List<String> paywalls, List<String> commands, ClickType click) { public boolean runMultiPaywall(Panel panel, PanelPosition position, Player p, List<String> paywalls, List<String> commands, ClickType click) {
boolean allPaywallsValid = true; boolean allPaywallsValid = true;
// New list combining paywalls and commands // New list combining paywalls and commands
@ -79,6 +79,9 @@ public class CommandRunner {
if (allPaywallsValid) { if (allPaywallsValid) {
plugin.commandRunner.runCommands(panel, position, p, allCommands, click); plugin.commandRunner.runCommands(panel, position, p, allCommands, click);
} }
// Return output as boolean for usage if applicable
return allPaywallsValid;
} }
//do this on startup to load listeners //do this on startup to load listeners

View File

@ -21,7 +21,7 @@ public class ItemPaywall implements Listener {
@EventHandler @EventHandler
public void commandTag(PaywallEvent e){ public void commandTag(PaywallEvent e){
if(e.name.equalsIgnoreCase("item-paywall=")){ if(e.name.equalsIgnoreCase("item-paywall=")){
//if player uses item-paywall= [Material] [Amount] <id:#> <IGNORENBT> WILL NOT TAKE CUSTOM ITEMS. IGNORENBT lets nbt items through. Useful for spawner edge cases. //if player uses item-paywall= [Material] [Amount] <IGNORENBT> WILL NOT TAKE CUSTOM ITEMS. IGNORENBT lets nbt items through. Useful for spawner edge cases.
//player can use item-paywall= [custom-item] [Amount] //player can use item-paywall= [custom-item] [Amount]
try { try {
boolean ignoreNBT = false; boolean ignoreNBT = false;