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;
|
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.Identifiable;
|
||||||
import ca.tweetzy.auctionhouse.ahv3.api.ListingType;
|
import ca.tweetzy.auctionhouse.ahv3.api.ListingType;
|
||||||
import ca.tweetzy.auctionhouse.ahv3.api.Synchronize;
|
import ca.tweetzy.auctionhouse.ahv3.api.Synchronize;
|
||||||
|
import ca.tweetzy.auctionhouse.ahv3.api.Trackable;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
package ca.tweetzy.auctionhouse.ahv3.api.auction;
|
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.Identifiable;
|
||||||
|
import ca.tweetzy.auctionhouse.ahv3.api.Trackable;
|
||||||
import ca.tweetzy.auctionhouse.api.interfaces.Storeable;
|
import ca.tweetzy.auctionhouse.api.interfaces.Storeable;
|
||||||
import ca.tweetzy.auctionhouse.auction.enums.AuctionStatisticType;
|
import ca.tweetzy.auctionhouse.auction.enums.AuctionStatisticType;
|
||||||
import lombok.NonNull;
|
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;
|
if (!player.getUniqueId().equals(UUID.fromString("c5351027-b0a0-48db-b817-f3b9a3469bfc"))) return ReturnType.FAIL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ReturnType.SUCCESS;
|
return ReturnType.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public class CommandAuctionHouse extends AbstractCommand {
|
|||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|
||||||
if (CommandMiddleware.handle(player) == ReturnType.FAILURE) return ReturnType.FAILURE;
|
if (CommandMiddleware.handle(player) == ReturnType.FAILURE) return ReturnType.FAILURE;
|
||||||
|
|
||||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||||
if (instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()) == null) {
|
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());
|
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) {
|
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
if (CommandMiddleware.handle(player) == ReturnType.FAILURE) return ReturnType.FAILURE;
|
if (CommandMiddleware.handle(player) == ReturnType.FAILURE) return ReturnType.FAILURE;
|
||||||
|
|
||||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
// Open the bans menu
|
// Open the bans menu
|
||||||
|
@ -58,7 +58,7 @@ public final class CommandUpload extends AbstractCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!args[0].equalsIgnoreCase("-confirm")) return ReturnType.FAILURE;
|
if (!args[0].equalsIgnoreCase("-confirm")) return ReturnType.FAILURE;
|
||||||
|
|
||||||
final AuctionHouse instance = AuctionHouse.getInstance();
|
final AuctionHouse instance = AuctionHouse.getInstance();
|
||||||
final DatabaseConnector databaseConnector = new SQLiteConnector(instance);
|
final DatabaseConnector databaseConnector = new SQLiteConnector(instance);
|
||||||
final DataManager manager = new DataManager(databaseConnector, instance, null);
|
final DataManager manager = new DataManager(databaseConnector, instance, null);
|
||||||
|
@ -34,50 +34,50 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
public abstract class TitleInput extends Input {
|
public abstract class TitleInput extends Input {
|
||||||
|
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final String title;
|
private final String title;
|
||||||
private final String subTitle;
|
private final String subTitle;
|
||||||
private final String actionbar;
|
private final String actionbar;
|
||||||
|
|
||||||
public TitleInput(@NonNull final Player player, final String title, final String subTitle, final String actionbar) {
|
public TitleInput(@NonNull final Player player, final String title, final String subTitle, final String actionbar) {
|
||||||
super(player);
|
super(player);
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.subTitle = subTitle;
|
this.subTitle = subTitle;
|
||||||
this.actionbar = actionbar;
|
this.actionbar = actionbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TitleInput(@NonNull final Player player, final String title, final String subTitle) {
|
public TitleInput(@NonNull final Player player, final String title, final String subTitle) {
|
||||||
this(player, Common.colorize(title), Common.colorize(subTitle), Common.colorize(""));
|
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) {
|
public boolean onInput(String text) {
|
||||||
if (this.onResult(text)) {
|
if (this.onResult(text)) {
|
||||||
this.close(true);
|
this.close(true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void close(PlayerInteractEvent e) {
|
public void close(PlayerInteractEvent e) {
|
||||||
if (e.getPlayer().equals(this.player) && (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK)) {
|
if (e.getPlayer().equals(this.player) && (e.getAction() == Action.LEFT_CLICK_AIR || e.getAction() == Action.LEFT_CLICK_BLOCK)) {
|
||||||
this.close(false);
|
this.close(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return this.title;
|
return this.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSubtitle() {
|
public String getSubtitle() {
|
||||||
return this.subTitle;
|
return this.subTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getActionBar() {
|
public String getActionBar() {
|
||||||
return this.actionbar;
|
return this.actionbar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ public final class AuctionStatisticManager {
|
|||||||
synchronized (this.statistics) {
|
synchronized (this.statistics) {
|
||||||
if (this.statistics.contains(statistic)) return;
|
if (this.statistics.contains(statistic)) return;
|
||||||
this.statistics.add(statistic);
|
this.statistics.add(statistic);
|
||||||
|
|
||||||
final UUID owner = statistic.getStatOwner();
|
final UUID owner = statistic.getStatOwner();
|
||||||
final double value = statistic.getValue();
|
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."
|
"&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",
|
"Valid Click Types",
|
||||||
"LEFT",
|
"LEFT",
|
||||||
"RIGHT",
|
"RIGHT",
|
||||||
@ -304,7 +304,6 @@ public class Settings {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ===============================
|
/* ===============================
|
||||||
* DATABASE OPTIONS
|
* DATABASE OPTIONS
|
||||||
* ===============================*/
|
* ===============================*/
|
||||||
|
Loading…
Reference in New Issue
Block a user