Problem/Bug Plugin return problems

Discussion in 'Plugin Help/Development/Requests' started by EvanChrispie, Jan 14, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    I started making a Maven project for the first time, and I copy and pasted in a previous broadcast plugin I made, which worked as a java project, but now in the Maven project its being weird. So what's happening is I think to do with the plugin.yml and the usage of my plugin.yml. Because when I don't put a usage in for the broadcast command it returns empty ingame , but when I do the usage which is /<command> it returns ingame with /broadcast instead of [Broadcast]<message> If someone could help that would be great thanks.
    package io.github.evanchrispie.TestPlugin;
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    public class Broadcast extends JavaPlugin{
        public void onEnable(){
            getLogger().info("Plugin Enabled!");
        public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) {
    Player player = (Player) sender;
    String message = "";
    for (String part : args) {
    if (message != "") message += " ";
    message += part;
    Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[" + ChatColor.AQUA + "Broadcast"+ ChatColor.GOLD + "]" + ChatColor.GREEN + " " + message);
    if (alias.equalsIgnoreCase("broadcast")) {
    if (args.length == 0) {
    } else {
    return false;
    name: TestPlugin
    version: 1.2
    main: io.github.evanchrispie.TestPlugin.Main
        description: Broadcast a server wide message
Thread Status:
Not open for further replies.

Share This Page