mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-26 06:05:25 +01:00
project wide reformat/import cleanup
Took 21 seconds
This commit is contained in:
parent
667ea9e0ca
commit
1b22b3a225
@ -18,10 +18,10 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.ahv3.api.auction;
|
||||
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Trackable;
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.ListingType;
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Synchronize;
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Trackable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.ahv3.api.auction;
|
||||
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Trackable;
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.ahv3.api.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.interfaces.Storeable;
|
||||
import ca.tweetzy.auctionhouse.auction.enums.AuctionStatisticType;
|
||||
import lombok.NonNull;
|
||||
|
@ -43,7 +43,6 @@ public final class AuctionHouseCommand extends Command {
|
||||
if (!player.getUniqueId().equals(UUID.fromString("c5351027-b0a0-48db-b817-f3b9a3469bfc"))) return ReturnType.FAIL;
|
||||
|
||||
|
||||
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class CommandAuctionHouse extends AbstractCommand {
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (CommandMiddleware.handle(player) == ReturnType.FAILURE) return ReturnType.FAILURE;
|
||||
|
||||
|
||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||
if (instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()) == null) {
|
||||
instance.getLocale().newMessage(TextUtils.formatText("&cCould not find auction player instance for&f: &e" + player.getName() + "&c creating one now.")).sendPrefixedMessage(Bukkit.getConsoleSender());
|
||||
|
@ -52,7 +52,7 @@ public class CommandBan extends AbstractCommand {
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
Player player = (Player) sender;
|
||||
if (CommandMiddleware.handle(player) == ReturnType.FAILURE) return ReturnType.FAILURE;
|
||||
|
||||
|
||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||
if (args.length == 0) {
|
||||
// Open the bans menu
|
||||
|
@ -58,7 +58,7 @@ public final class CommandUpload extends AbstractCommand {
|
||||
}
|
||||
|
||||
if (!args[0].equalsIgnoreCase("-confirm")) return ReturnType.FAILURE;
|
||||
|
||||
|
||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||
final DatabaseConnector databaseConnector = new SQLiteConnector(instance);
|
||||
final DataManager manager = new DataManager(databaseConnector, instance, null);
|
||||
|
@ -34,50 +34,50 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
public abstract class TitleInput extends Input {
|
||||
|
||||
private final Player player;
|
||||
private final String title;
|
||||
private final String subTitle;
|
||||
private final String actionbar;
|
||||
private final String title;
|
||||
private final String subTitle;
|
||||
private final String actionbar;
|
||||
|
||||
public TitleInput(@NonNull final Player player, final String title, final String subTitle, final String actionbar) {
|
||||
super(player);
|
||||
this.player = player;
|
||||
this.title = title;
|
||||
this.subTitle = subTitle;
|
||||
this.actionbar = actionbar;
|
||||
}
|
||||
public TitleInput(@NonNull final Player player, final String title, final String subTitle, final String actionbar) {
|
||||
super(player);
|
||||
this.player = player;
|
||||
this.title = title;
|
||||
this.subTitle = subTitle;
|
||||
this.actionbar = actionbar;
|
||||
}
|
||||
|
||||
public TitleInput(@NonNull final Player player, final String title, final String subTitle) {
|
||||
this(player, Common.colorize(title), Common.colorize(subTitle), Common.colorize(""));
|
||||
}
|
||||
public TitleInput(@NonNull final Player player, final String title, final String subTitle) {
|
||||
this(player, Common.colorize(title), Common.colorize(subTitle), Common.colorize(""));
|
||||
}
|
||||
|
||||
public abstract boolean onResult(String string);
|
||||
public abstract boolean onResult(String string);
|
||||
|
||||
public boolean onInput(String text) {
|
||||
if (this.onResult(text)) {
|
||||
this.close(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public boolean onInput(String text) {
|
||||
if (this.onResult(text)) {
|
||||
this.close(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void close(PlayerInteractEvent e) {
|
||||
if (e.getPlayer().equals(this.player) && (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK)) {
|
||||
this.close(false);
|
||||
}
|
||||
}
|
||||
@EventHandler
|
||||
public void close(PlayerInteractEvent e) {
|
||||
if (e.getPlayer().equals(this.player) && (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK)) {
|
||||
this.close(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubtitle() {
|
||||
return this.subTitle;
|
||||
}
|
||||
@Override
|
||||
public String getSubtitle() {
|
||||
return this.subTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActionBar() {
|
||||
return this.actionbar;
|
||||
}
|
||||
@Override
|
||||
public String getActionBar() {
|
||||
return this.actionbar;
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public final class AuctionStatisticManager {
|
||||
synchronized (this.statistics) {
|
||||
if (this.statistics.contains(statistic)) return;
|
||||
this.statistics.add(statistic);
|
||||
|
||||
|
||||
final UUID owner = statistic.getStatOwner();
|
||||
final double value = statistic.getValue();
|
||||
|
||||
|
@ -291,7 +291,7 @@ public class Settings {
|
||||
"&cIf you overlap click types (ex. LEFT for both inspect and buy) things will go crazy."
|
||||
);
|
||||
|
||||
public static final ConfigSetting CLICKS_FILTER_CATEGORY= new ConfigSetting(config, "auction setting.clicks.filter.change category", "LEFT",
|
||||
public static final ConfigSetting CLICKS_FILTER_CATEGORY = new ConfigSetting(config, "auction setting.clicks.filter.change category", "LEFT",
|
||||
"Valid Click Types",
|
||||
"LEFT",
|
||||
"RIGHT",
|
||||
@ -304,7 +304,6 @@ public class Settings {
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* ===============================
|
||||
* DATABASE OPTIONS
|
||||
* ===============================*/
|
||||
|
Loading…
Reference in New Issue
Block a user