mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-20 19:22:48 +00:00
41 lines
901 B
Java
41 lines
901 B
Java
package com.volmit.iris.command;
|
|
|
|
import org.bukkit.Sound;
|
|
|
|
import com.volmit.iris.Iris;
|
|
import com.volmit.iris.WandController;
|
|
import com.volmit.iris.util.MortarCommand;
|
|
import com.volmit.iris.util.MortarSender;
|
|
|
|
public class CommandIrisObjectWand extends MortarCommand
|
|
{
|
|
public CommandIrisObjectWand()
|
|
{
|
|
super("wand", "w");
|
|
requiresPermission(Iris.perm);
|
|
setCategory("Object");
|
|
setDescription("Get an Iris Wand for selecting objects");
|
|
}
|
|
|
|
@Override
|
|
public boolean handle(MortarSender sender, String[] args)
|
|
{
|
|
if(!sender.isPlayer())
|
|
{
|
|
sender.sendMessage("You don't have an inventory");
|
|
return true;
|
|
}
|
|
|
|
sender.player().getInventory().addItem(WandController.createWand());
|
|
sender.player().playSound(sender.player().getLocation(), Sound.ITEM_ARMOR_EQUIP_NETHERITE, 1f, 1.5f);
|
|
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
protected String getArgsUsage()
|
|
{
|
|
return "[subcommand]";
|
|
}
|
|
}
|