mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
i hate /campfire
This commit is contained in:
parent
adfd55b419
commit
3fd7147fc2
@ -11,25 +11,18 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "You know the words - gives a campfire to everyone on the server.", usage = "/<command>")
|
@CommandParameters(description = "You have thrown a rock, but you have also summoned a meteor!", usage = "/<command>")
|
||||||
public class Command_campfire extends FreedomCommand
|
public class Command_rock extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String CAMPFIRE_LYRICS = "Let's gather round the campfire, and sing our campfire song....";
|
public static final String ROCK_LYRICS = ChatColor.BLUE + "You have thrown a rock, but you have also summoned a meteor!";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
|
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
final StringBuilder output = new StringBuilder();
|
final ItemStack heldItem = new ItemStack(Material.STONE);
|
||||||
|
|
||||||
for (final String word : CAMPFIRE_LYRICS.split(" "))
|
|
||||||
{
|
|
||||||
output.append(FUtil.randomChatColor()).append(word).append(" ");
|
|
||||||
}
|
|
||||||
|
|
||||||
final ItemStack heldItem = new ItemStack(Material.CAMPFIRE);
|
|
||||||
final ItemMeta heldItemMeta = heldItem.getItemMeta();
|
final ItemMeta heldItemMeta = heldItem.getItemMeta();
|
||||||
heldItemMeta.setDisplayName(ChatColor.DARK_RED + "The " + ChatColor.DARK_RED + "Campfire");
|
heldItemMeta.setDisplayName(ChatColor.BLUE + "Rock");
|
||||||
heldItem.setItemMeta(heldItemMeta);
|
heldItem.setItemMeta(heldItemMeta);
|
||||||
|
|
||||||
for (final Player player : this.server.getOnlinePlayers())
|
for (final Player player : this.server.getOnlinePlayers())
|
||||||
@ -41,7 +34,7 @@ public class Command_campfire extends FreedomCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FUtil.bcastMsg(output.toString());
|
FUtil.bcastMsg(ROCK_LYRICS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user