mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-07 12:47:36 +01:00
1.0.8, DiscordMessageWrapper, SellCommand, Config
This commit is contained in:
parent
47b91cdd0f
commit
f160d29d92
@ -32,8 +32,8 @@ public class DiscordMessageWrapper {
|
||||
.name(name.substring(name.lastIndexOf(".")).replace("_", " ").replace(".", ""))
|
||||
.value(Core.getInstance().getConfig().getString(configLocation + ".data").replace("{seller}", Bukkit.getOfflinePlayer(UUID.fromString(auctionItem.getOwner())).getName())
|
||||
.replace("{bid_start}", AuctionAPI.getInstance().friendlyNumber(auctionItem.getStartPrice()))
|
||||
.replace("{bid_increment}", AuctionAPI.getInstance().friendlyNumber(auctionItem.getBidIncrement()))
|
||||
.replace("{buy_now}", AuctionAPI.getInstance().friendlyNumber(auctionItem.getBuyNowPrice()))
|
||||
.replace("{bid_increment}", (auctionItem.getBidIncrement() == 0) ? "0" : AuctionAPI.getInstance().friendlyNumber(auctionItem.getBidIncrement()))
|
||||
.replace("{buy_now}", (auctionItem.getBuyNowPrice() == 0) ? "0" : AuctionAPI.getInstance().friendlyNumber(auctionItem.getBuyNowPrice()))
|
||||
.replace("{item_type}", auctionItem.getItem().getType().name())
|
||||
.replace("{item_name}", getDisplayName())
|
||||
.replace("{item_enchants}", getEnchantments())
|
||||
|
@ -17,7 +17,10 @@ import org.bukkit.Material;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The current file has been created by Kiran Hart
|
||||
@ -55,11 +58,11 @@ public class SellCommand extends SubCommand {
|
||||
int timeLimit;
|
||||
List<Integer> times = new ArrayList<>();
|
||||
|
||||
for (String nodes : Core.getInstance().getConfig().getStringList("time-limits")) {
|
||||
if (p.hasPermission(nodes)) {
|
||||
times.add(Core.getInstance().getConfig().getInt("time-limits." + nodes));
|
||||
Core.getInstance().getConfig().getConfigurationSection("auctiontime").getKeys(false).forEach(perm -> {
|
||||
if (p.hasPermission("auctiontime." + String.valueOf(perm))) {
|
||||
times.add(Core.getInstance().getConfig().getInt("auctiontime." + perm));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
timeLimit = (times.size() <= 0) ? Core.getInstance().getConfig().getInt("settings.default-auction-time") : Collections.max(times);
|
||||
|
||||
|
@ -15,7 +15,7 @@ settings:
|
||||
min-auction-increment: 1
|
||||
owner-can-purchase-own: false
|
||||
owner-can-bid-own: false
|
||||
use-bid-system: false
|
||||
use-bid-system: false #WARNING : CHANGING THIS WHILE ITEMS ARE IN THE AUCTION HOUSE WILL CAUSE THEM TO BE LOST, END ALL AUCTIONS BEFORE CHANGING AND RESTARTING THE SERVER.
|
||||
auto-refresh-auction-page: true
|
||||
bid:
|
||||
increase-on-bid: true
|
||||
@ -66,9 +66,9 @@ discord:
|
||||
data: "{item_lore}"
|
||||
|
||||
#add permissions to allow more auction time.
|
||||
time-limits:
|
||||
auctionhouse.times.default: 600
|
||||
auctionhouse.times.rank1: 1200
|
||||
auctiontime:
|
||||
default: 600
|
||||
rank1: 1200
|
||||
|
||||
#Blocked items that cannot be listed on the auction house
|
||||
#You must include the type data (the number of : ) usually it's 0
|
||||
|
Loading…
Reference in New Issue
Block a user