Adjusted Hello World Classes, fixed a few bugs
This commit is contained in:
parent
ab491b9122
commit
05463da034
7 changed files with 15 additions and 9 deletions
|
@ -8,6 +8,9 @@ public abstract class UniversalCommand extends BaseCommand{
|
|||
public String[] GetHelpText(String alias){
|
||||
return new String[] {
|
||||
"This command doesn't have help text. ",
|
||||
"If you're a player, ask a mod to write one",
|
||||
"If you're a mod, ask a dev to write one",
|
||||
"If you're a dev, write the help text you lazy bastard. -Ali"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ public class HelloCommand extends UniversalCommand {
|
|||
@Override
|
||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||
sender.sendMessage("Hello World!");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,6 @@ public class HelloSave extends UniversalCommand {
|
|||
sender.sendMessage(e.toString());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public class HelloBlock extends PlayerCommand {
|
|||
|
||||
blockAtPlayer.setType(Material.CAKE_BLOCK);
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,12 +19,15 @@ public class HelloMagicPotato extends ModCommand {
|
|||
ItemStack potato = new ItemStack(Material.BAKED_POTATO);
|
||||
ItemMeta meta = potato.getItemMeta();
|
||||
|
||||
potato.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
|
||||
meta.addEnchant(Enchantment.DURABILITY, 10, true);
|
||||
|
||||
ArrayList<String> lore = new ArrayList<String>();
|
||||
lore.add("Once upon a time");
|
||||
lore.add("There was a beautiful potato that ruled a fantastic kingdom. With its armies of french"
|
||||
+ "fries and cannons of hash browns, it was unstopple.");
|
||||
lore.add("There was a beautiful potato");
|
||||
lore.add("that ruled a fantastic kingdom.");
|
||||
lore.add("With its armies of french fries");
|
||||
lore.add("and cannons of hash browns,");
|
||||
lore.add("it was unstopple.");
|
||||
lore.add("Until one fateful day...");
|
||||
|
||||
meta.setLore(lore);
|
||||
|
|
|
@ -12,7 +12,7 @@ public class HelloParticle extends PlayerCommand {
|
|||
@Override
|
||||
public boolean OnCommand(Player player, String alias, String[] args) {
|
||||
player.getWorld().spawnParticle(Particle.CLOUD, player.getLocation(), 10);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ public class HelloSound extends PlayerCommand{
|
|||
}
|
||||
|
||||
}
|
||||
player.getWorld().playSound(player.getLocation(), Sound.BLOCK_ANVIL_FALL, volume, pitch);
|
||||
return false;
|
||||
player.getWorld().playSound(player.getLocation(), Sound.BLOCK_ANVIL_LAND, volume, pitch);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue