mirror of
https://github.com/songoda/UltimateModeration.git
synced 2024-11-13 22:05:17 +01:00
Lets actually open the ticket GUI when the command is used.
This commit is contained in:
parent
e86c6a342f
commit
427f428d1d
@ -43,7 +43,6 @@ public class UltimateModeration extends SongodaPlugin {
|
||||
private ModerationManager moderationManager;
|
||||
|
||||
private DatabaseConnector databaseConnector;
|
||||
private DataMigrationManager dataMigrationManager;
|
||||
private DataManager dataManager;
|
||||
|
||||
public static UltimateModeration getInstance() {
|
||||
@ -84,7 +83,7 @@ public class UltimateModeration extends SongodaPlugin {
|
||||
this.commandManager.addCommand(new CommandRunTemplate(this));
|
||||
this.commandManager.addCommand(new CommandSlowMode(this));
|
||||
this.commandManager.addCommand(new CommandStaffChat(this));
|
||||
this.commandManager.addCommand(new CommandTicket(this));
|
||||
this.commandManager.addCommand(new CommandTicket(this, guiManager));
|
||||
this.commandManager.addCommand(new CommandToggleChat(this));
|
||||
this.commandManager.addCommand(new CommandUnBan(this));
|
||||
this.commandManager.addCommand(new CommandUnMute(this));
|
||||
@ -116,9 +115,9 @@ public class UltimateModeration extends SongodaPlugin {
|
||||
}
|
||||
|
||||
this.dataManager = new DataManager(this.databaseConnector, this);
|
||||
this.dataMigrationManager = new DataMigrationManager(this.databaseConnector, this.dataManager,
|
||||
DataMigrationManager dataMigrationManager = new DataMigrationManager(this.databaseConnector, this.dataManager,
|
||||
new _1_InitialMigration());
|
||||
this.dataMigrationManager.runMigrations();
|
||||
dataMigrationManager.runMigrations();
|
||||
|
||||
} catch (Exception ex) {
|
||||
this.getLogger().severe("Fatal error trying to connect to database. " +
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.songoda.ultimatemoderation.commands;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.core.gui.GuiManager;
|
||||
import com.songoda.ultimatemoderation.UltimateModeration;
|
||||
import com.songoda.ultimatemoderation.gui.TicketManagerGui;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -11,17 +12,18 @@ import java.util.List;
|
||||
public class CommandTicket extends AbstractCommand {
|
||||
|
||||
private final UltimateModeration plugin;
|
||||
private final GuiManager guiManager;
|
||||
|
||||
public CommandTicket(UltimateModeration plugin) {
|
||||
public CommandTicket(UltimateModeration plugin, GuiManager guiManager) {
|
||||
super(CommandType.PLAYER_ONLY, "Ticket");
|
||||
this.plugin = plugin;
|
||||
this.guiManager = guiManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
Player senderP = ((Player) sender);
|
||||
|
||||
new TicketManagerGui(plugin, senderP, senderP);
|
||||
guiManager.showGUI(senderP, new TicketManagerGui(plugin, senderP, senderP));
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user