mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-26 06:05:25 +01:00
transactions command
This commit is contained in:
parent
df62af28d0
commit
4c0009905d
@ -102,6 +102,7 @@ public class AuctionHouse extends TweetyPlugin {
|
||||
new CommandSell(),
|
||||
new CommandActive(),
|
||||
new CommandExpired(),
|
||||
new CommandTransactions(),
|
||||
new CommandSettings()
|
||||
);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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
|
||||
@ -38,3 +39,6 @@ permissions:
|
||||
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
|
Loading…
Reference in New Issue
Block a user