diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/Command/PunishCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/Command/PunishCommand.java index 0fefed051..59b1ea862 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/Command/PunishCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/Command/PunishCommand.java @@ -15,12 +15,18 @@ import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.core.punish.Punish; import mineplex.core.punish.UI.PunishPage; +import mineplex.core.punish.UI.PunishPageOld; +import mineplex.core.punish.UI.PunishShop; public class PunishCommand extends CommandBase { + private PunishShop _punishShop; + public PunishCommand(Punish plugin) { super(plugin, Punish.Perm.PUNISHMENT_COMMAND, "punish", "p"); + + _punishShop = new PunishShop(plugin); } @Override @@ -71,7 +77,7 @@ public class PunishCommand extends CommandBase Plugin.GetRepository().LoadPunishClient(originalName.get(), clientToken -> { Plugin.LoadClient(clientToken); - new PunishPage(Plugin, caller, originalName.get(), finalReason, wasDisguised.get(), originalName.get(), disguisedName.get()); + _punishShop.openPageForPlayer(caller, new PunishPage(Plugin, _punishShop, caller, originalName.get(), finalReason, wasDisguised.get(), originalName.get(), disguisedName.get())); }); return; @@ -113,7 +119,7 @@ public class PunishCommand extends CommandBase Plugin.GetRepository().LoadPunishClient(t, clientToken -> { Plugin.LoadClient(clientToken); - new PunishPage(Plugin, caller, t, finalReason, false, null, null); + _punishShop.openPageForPlayer(caller, new PunishPage(Plugin, _punishShop, caller, t, finalReason, false, null, null)); }); }, caller, finalPlayerName, true); }, playerName); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishShop.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishShop.java new file mode 100644 index 000000000..414f3daf7 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishShop.java @@ -0,0 +1,23 @@ +package mineplex.core.punish.UI; + +import org.bukkit.entity.Player; + +import mineplex.core.Managers; +import mineplex.core.donation.DonationManager; +import mineplex.core.punish.Punish; +import mineplex.core.shop.ShopBase; +import mineplex.core.shop.page.ShopPageBase; + +public class PunishShop extends ShopBase +{ + public PunishShop(Punish plugin) + { + super(plugin, plugin.GetClients(), Managers.require(DonationManager.class), "Punish"); + } + + @Override + protected ShopPageBase> buildPagesFor(Player player) + { + return null; + } +}