adding a list mythic command
This commit is contained in:
parent
f2345994ca
commit
b617a39b40
24
src/main/java/net/hexa/MythicItems/CommandListMythics.java
Normal file
24
src/main/java/net/hexa/MythicItems/CommandListMythics.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package net.hexa.MythicItems;
|
||||||
|
|
||||||
|
import net.hexa.MythicItems.Mythics.MythicItem;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
public class CommandListMythics implements CommandExecutor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (sender instanceof Player) {
|
||||||
|
Player player = (Player) sender;
|
||||||
|
|
||||||
|
ItemStack item = MythicItem.getMythicById(0).item;
|
||||||
|
|
||||||
|
player.getInventory().addItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,3 +7,6 @@ commands:
|
|||||||
essence:
|
essence:
|
||||||
description: Gives a Mythic Item Essence
|
description: Gives a Mythic Item Essence
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
|
listMythics:
|
||||||
|
description: Lists Mythic Items
|
||||||
|
usage: /<command>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user