71 lines
2.7 KiB
Java
71 lines
2.7 KiB
Java
package net.crankedpvp.help.commands;
|
|
|
|
import me.mattstudios.mf.annotations.Alias;
|
|
import me.mattstudios.mf.annotations.Command;
|
|
import me.mattstudios.mf.annotations.Default;
|
|
import me.mattstudios.mf.annotations.SubCommand;
|
|
import me.mattstudios.mf.base.CommandBase;
|
|
import net.crankedpvp.crankedmasks.inventory.MasksInventory;
|
|
import net.crankedpvp.crankedpets.inventory.PetsInventory;
|
|
import net.crankedpvp.crankedpets.inventory.PetsMainInventory;
|
|
import net.crankedpvp.help.HelpPlugin;
|
|
import net.crankedpvp.help.inventory.FactionsHelpInventory;
|
|
import net.crankedpvp.help.inventory.HelpInventory;
|
|
import net.crankedpvp.help.inventory.PvPHelpInventory;
|
|
import org.bukkit.Sound;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@Command("help")
|
|
@Alias("helpp")
|
|
public class HelpCommand extends CommandBase {
|
|
|
|
private final HelpPlugin plugin;
|
|
public HelpCommand(HelpPlugin plugin) {
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
@Default
|
|
public void defaultCommand(final Player player) {
|
|
HelpInventory helpInventory = this.plugin.getInventoryManager().getHelpInventory();
|
|
helpInventory.getHelpMenuInventory().open(player);
|
|
player.playSound(player.getLocation(), Sound.CHEST_OPEN, 2.0F, 2.0F);
|
|
}
|
|
|
|
@SubCommand("factions")
|
|
@Alias("faction")
|
|
public void factionsHelpCommand(final Player player) {
|
|
FactionsHelpInventory factionsHelpInventory = this.plugin.getInventoryManager().getFactionsHelpInventory();
|
|
factionsHelpInventory.getFactionsHelpInventory().open(player);
|
|
player.playSound(player.getLocation(), Sound.CHEST_OPEN, 2.0F, 2.0F);
|
|
}
|
|
|
|
@SubCommand("pvp")
|
|
public void pvpHelpCommand(final Player player) {
|
|
PvPHelpInventory pvPHelpInventory = this.plugin.getInventoryManager().getPvPHelpInventory();
|
|
pvPHelpInventory.getPvpHelpMenu().open(player);
|
|
player.playSound(player.getLocation(), Sound.CHEST_OPEN, 2.0F, 2.0F);
|
|
}
|
|
|
|
@SubCommand("pet")
|
|
@Alias("pets")
|
|
public void petHelpCommand(final Player player) {
|
|
PetsMainInventory petsInventory = this.plugin.getInventoryManager().getPetsInventory();
|
|
petsInventory.getUI().open(player);
|
|
player.playSound(player.getLocation(), Sound.CHEST_OPEN, 2.0F, 2.0F);
|
|
}
|
|
|
|
@SubCommand("mask")
|
|
@Alias("masks")
|
|
public void maskHelpCommand(final Player player) {
|
|
MasksInventory masksInventory = this.plugin.getInventoryManager().getMasksInventory();
|
|
masksInventory.getUI().open(player);
|
|
player.playSound(player.getLocation(), Sound.CHEST_OPEN, 2.0F, 2.0F);
|
|
}
|
|
|
|
@SubCommand("underworld")
|
|
@Alias({"uw", "uworld", "underw"})
|
|
public void underworldHelpCommand(final Player player) {
|
|
player.playSound(player.getLocation(), Sound.CHEST_OPEN, 2.0F, 2.0F);
|
|
}
|
|
}
|