transactions command

This commit is contained in:
Kiran Hart 2021-03-23 21:34:13 -04:00
parent df62af28d0
commit 4c0009905d
3 changed files with 55 additions and 0 deletions

View File

@ -102,6 +102,7 @@ public class AuctionHouse extends TweetyPlugin {
new CommandSell(),
new CommandActive(),
new CommandExpired(),
new CommandTransactions(),
new CommandSettings()
);

View File

@ -0,0 +1,50 @@
package ca.tweetzy.auctionhouse.commands;
import ca.tweetzy.auctionhouse.AuctionHouse;
import ca.tweetzy.auctionhouse.guis.GUIActiveAuctions;
import ca.tweetzy.auctionhouse.guis.transaction.GUITransactionList;
import ca.tweetzy.core.commands.AbstractCommand;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.List;
/**
* The current file has been created by Kiran Hart
* Date Created: March 23 2021
* Time Created: 9:29 p.m.
* Usage of any code found within this class is prohibited unless given explicit permission otherwise
*/
public class CommandTransactions extends AbstractCommand {
public CommandTransactions() {
super(CommandType.PLAYER_ONLY, "transactions");
}
@Override
protected ReturnType runCommand(CommandSender sender, String... args) {
Player player = (Player) sender;
AuctionHouse.getInstance().getGuiManager().showGUI(player, new GUITransactionList(AuctionHouse.getInstance().getAuctionPlayerManager().getPlayer(player.getUniqueId())));
return ReturnType.SUCCESS;
}
@Override
public String getPermissionNode() {
return "auctionhouse.cmd.transactions";
}
@Override
public String getSyntax() {
return "transactions";
}
@Override
public String getDescription() {
return "Used to open the transactions menu";
}
@Override
protected List<String> onTab(CommandSender sender, String... args) {
return null;
}
}

View File

@ -23,6 +23,7 @@ permissions:
auctionhouse.cmd.active: true
auctionhouse.cmd.expired: true
auctionhouse.cmd.settings: true
auctionhouse.cmd.transactions: true
auctionhouse.cmd:
description: Allows the user to use /ah
default: op
@ -37,4 +38,7 @@ permissions:
default: op
auctionhouse.cmd.settings:
description: Allows the user to open the in game config editor
default: op
auctionhouse.cmd.transactions:
description: Allows the user to open the transactions menu
default: op