Added Potato Debugging Tool
This commit is contained in:
parent
06dbd69d39
commit
52c97535ab
3 changed files with 36 additions and 6 deletions
34
src/alisolarflare/components/BaseCommand.java
Normal file
34
src/alisolarflare/components/BaseCommand.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package alisolarflare.components;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||
|
||||
public abstract class BaseCommand extends TBMCCommandBase{
|
||||
public static ItemStack CreateDebugPotato(List<String> debugMessage){
|
||||
ItemStack debugPotato = new ItemStack(Material.BAKED_POTATO);
|
||||
debugPotato.getItemMeta().setDisplayName("Spicy Debug Potato");
|
||||
debugPotato.getItemMeta().setLore(debugMessage);
|
||||
debugPotato.addEnchantment(Enchantment.ARROW_FIRE, 10);
|
||||
return debugPotato;
|
||||
}
|
||||
public static ItemStack CreateDebugPotato(String debugMessage){
|
||||
return CreateDebugPotato(Arrays.asList(debugMessage));
|
||||
}
|
||||
public static void SendDebugPotato(Player player, List<String> debugMessage){
|
||||
player.getInventory().addItem(CreateDebugPotato(debugMessage));
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ENTITY_SLIME_SQUISH, 0, 0);
|
||||
return;
|
||||
}
|
||||
public static void SendDebugPotato(Player player, String debugMessage){
|
||||
SendDebugPotato(player, Arrays.asList(debugMessage));
|
||||
}
|
||||
|
||||
}
|
|
@ -2,9 +2,7 @@ package alisolarflare.components;
|
|||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||
|
||||
public abstract class ModCommand extends TBMCCommandBase{
|
||||
public abstract class ModCommand extends BaseCommand{
|
||||
|
||||
@Override
|
||||
public abstract boolean OnCommand(CommandSender sender, String alias, String[] args);
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package alisolarflare.components;
|
||||
|
||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||
|
||||
public abstract class PlayerCommand extends TBMCCommandBase{
|
||||
public abstract class PlayerCommand extends BaseCommand{
|
||||
@Override
|
||||
public boolean GetPlayerOnly() {
|
||||
// TODO Auto-generated method stub
|
||||
|
|
Loading…
Reference in a new issue