diff --git a/pom.xml b/pom.xml index 3cedf08..69d55bf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,10 +5,11 @@ 4.0.0 - dev.zotware.displayshops + xzot1k.plugins.ds DisplayShopsAPI DisplayShopsAPI - 1.3.8 + 1.3.9 + jar 8 @@ -21,7 +22,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -31,7 +32,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.4 + 3.3.0 package @@ -68,14 +69,14 @@ org.spigotmc spigot-api - 1.19-R0.1-SNAPSHOT + 1.19.3-R0.1-SNAPSHOT provided org.jetbrains annotations 23.0.0 - compile + provided com.github.MilkBowl diff --git a/src/main/java/xzot1k/plugins/ds/api/Manager.java b/src/main/java/xzot1k/plugins/ds/api/Manager.java index 56c9904..8978c24 100644 --- a/src/main/java/xzot1k/plugins/ds/api/Manager.java +++ b/src/main/java/xzot1k/plugins/ds/api/Manager.java @@ -16,11 +16,10 @@ import org.bukkit.potion.PotionType; import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import xzot1k.plugins.ds.api.enums.ChatInteractionType; import xzot1k.plugins.ds.api.enums.EconomyCallType; import xzot1k.plugins.ds.api.events.EconomyCallEvent; -import xzot1k.plugins.ds.api.handlers.ActionBarHandler; -import xzot1k.plugins.ds.api.handlers.ParticleHandler; import xzot1k.plugins.ds.api.objects.DataPack; import xzot1k.plugins.ds.api.objects.MarketRegion; import xzot1k.plugins.ds.api.objects.Shop; @@ -427,7 +426,7 @@ EconomyCallEvent initiateShopEconomyTransaction(@NotNull Player investor, @NotNu * @param amount The amount of the item stack. * @return The shop creation physical item stack. */ - ItemStack buildShopCreationItem(@NotNull Player player, int amount); + ItemStack buildShopCreationItem(@Nullable Player player, int amount); /** * Builds and returns the shop currency item. @@ -492,10 +491,6 @@ EconomyCallEvent initiateShopEconomyTransaction(@NotNull Player investor, @NotNu // getters & setters Map getShopMap(); - ParticleHandler getParticleHandler(); - - ActionBarHandler getActionBarHandler(); - List getMarketRegions(); Map getDataPackMap(); diff --git a/src/main/java/xzot1k/plugins/ds/api/PacketManager.java b/src/main/java/xzot1k/plugins/ds/api/PacketManager.java index 2ee8205..f4701c6 100644 --- a/src/main/java/xzot1k/plugins/ds/api/PacketManager.java +++ b/src/main/java/xzot1k/plugins/ds/api/PacketManager.java @@ -16,6 +16,8 @@ public interface PacketManager { SerializeUtil getSerializeUtil(); + String toString(@NotNull ItemStack itemStack); + ItemStack toItem(@NotNull String itemString); String toJSON(@NotNull ItemStack itemStack); diff --git a/src/main/java/xzot1k/plugins/ds/api/objects/Shop.java b/src/main/java/xzot1k/plugins/ds/api/objects/Shop.java index 9c13c48..ad9f07d 100644 --- a/src/main/java/xzot1k/plugins/ds/api/objects/Shop.java +++ b/src/main/java/xzot1k/plugins/ds/api/objects/Shop.java @@ -7,6 +7,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import xzot1k.plugins.ds.api.enums.EconomyCallType; import java.util.List; @@ -290,7 +291,7 @@ public interface Shop { * * @param currentEditor The unique ID of the player editing. */ - void setCurrentEditor(@NotNull UUID currentEditor); + void setCurrentEditor(@Nullable UUID currentEditor); /** * Resets the shop entirely. The time stamp is also updated. diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 6710d9f..e3a80d5 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -20,6 +20,10 @@ mysql: # immediately after all packets are sent out and managed. This will resolve the increasing memory usage until garbage collection automates later on. run-gc-immediately: true +# When shops are loaded or the cleanup command is executed all shops with owners that have been in-active for +# this amount of time (in seconds) will be deleted. +clean-inactive-duration: -1 + # These will completely determine how piston protection is handled. piston-protection: # This option determines if piston protection should even be used (WARNING: base-block will be damaged if pushed/retracted, if disabled). @@ -146,6 +150,9 @@ empty-shop-item: true # If this option is enabled, shops will use the owner's balance instead of the stored balance when they are online. sync-owner-balance: false +# This cooldown acts as a delay between performing a buy/sell action within the transaction menu as an attempt to prevent auto-clicking. +transaction-cooldown: 1 + # This is the price the player must pay to get a shop creation item. creation-item-price: 250 diff --git a/src/main/resources/lang.yml b/src/main/resources/lang.yml index 9a11539..a6b9976 100644 --- a/src/main/resources/lang.yml +++ b/src/main/resources/lang.yml @@ -181,6 +181,7 @@ notify-toggle-off: "&aShop sale notifications have been &eDisabled &afor you." visit-filter-prompt: "&aPlease enter the shop's item name and/or material type to find matches (Type &e{cancel} &ato cancel):" visit-filter-count: "&aFound &e{count} &ashop results with &e{filter} &ain either the name, description, type, and/or price!" visit-filter-none: "&cNo shops contain &e{filter} &cin their name, description, type, and/or price." +balance-command-usage: "&cUsage: &e/displayshops balance " ## Hook Messages ## towny-no-access: "&cYou do not have access to this shop plot."