Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable join notifications for auctions #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ public class AuctionConfig {
"https://hub.spigotmc.org/javadocs/spigot/org/bukkit/GameMode.html"
);

public static final ConfigValue<Boolean> NOTIFY_UNCLAIMED_ON_JOIN = ConfigValue.create("Settings.Notify_Unclaimed_On_Join",
true,
"When enabled, players will receive a message about unclaimed listings when they join the server."
);

public static final ConfigValue<Boolean> NOTIFY_EXPIRED_ON_JOIN = ConfigValue.create("Settings.Notify_Expired_On_Join",
true,
"When enabled, players will receive a message about expired listings when they join the server."
);

public static final ConfigValue<Boolean> LISTINGS_HIDE_ATTRIBUTES = ConfigValue.create("Settings.Listings.Hide_Attributes",
false,
"When enabled, will hide item attributes (damage, durability, etc.) of auction listings.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public void onSellerJoin(PlayerJoinEvent e) {
if (AuctionConfig.LISINGS_AUTO_CLAIM.get()) {
this.auctionManager.claimRewards(player, unclaimed);
}
else {
else if (AuctionConfig.NOTIFY_UNCLAIMED_ON_JOIN.get()) {
AuctionLang.NOTIFY_UNCLAIMED_LISTINGS.getMessage()
.replace(Placeholders.GENERIC_AMOUNT, unclaimed.size())
.send(player);
}
}
if (expired > 0) {
if (expired > 0 && AuctionConfig.NOTIFY_EXPIRED_ON_JOIN.get()) {
AuctionLang.NOTIFY_EXPIRED_LISTINGS.getMessage()
.replace(Placeholders.GENERIC_AMOUNT, expired)
.send(player);
Expand Down