Ajout de certains alias de commandes + ajout de la commande /broadcast
This commit is contained in:
@@ -216,6 +216,24 @@ public class ConfigManager {
|
||||
alias.put("replaceWith", "/ptime");
|
||||
alias.put("permissions", "pandacraft.grade.users");
|
||||
CommandAlias_alias.add(alias);
|
||||
|
||||
alias = new HashMap<String, String>();
|
||||
alias.put("initialCommand", "/shop");
|
||||
alias.put("replaceWith", "/warp shop");
|
||||
alias.put("permissions", "*"); // tout le monde
|
||||
CommandAlias_alias.add(alias);
|
||||
|
||||
alias = new HashMap<String, String>();
|
||||
alias.put("initialCommand", "/tete");
|
||||
alias.put("replaceWith", "/heads nick");
|
||||
alias.put("permissions", "*");
|
||||
CommandAlias_alias.add(alias);
|
||||
|
||||
alias = new HashMap<String, String>();
|
||||
alias.put("initialCommand", "/inscription");
|
||||
alias.put("replaceWith", "/mail send marcbal Inscription");
|
||||
alias.put("permissions", "pandacraft.grade.not_default");
|
||||
CommandAlias_alias.add(alias);
|
||||
/*
|
||||
Map<String, String> alias = new HashMap<String, String>();
|
||||
alias.put("initialCommand", "");
|
||||
|
@@ -11,6 +11,7 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.cheat_protect.no_pvp.NoPvpP
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.login_message.LoginLogoutManager;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.player_count_list.PacketOutServerInfoListener;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands._command_alias.CommandAliasManager;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.broadcast.CommandBroadcast;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.list.CommandList;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.me.CommandMe;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.ping.CommandPing;
|
||||
@@ -42,6 +43,7 @@ public class PandacraftUtils extends JavaPlugin {
|
||||
public CommandWandSelection commandWandSelection;
|
||||
public CommandStaff commandStaff;
|
||||
public CommandCubo commandCubo;
|
||||
public CommandBroadcast commandBroadcast;
|
||||
|
||||
public CommandAliasManager commandAliasManager;
|
||||
public SpawnTimeManager spawnTimeManager;
|
||||
@@ -80,6 +82,7 @@ public class PandacraftUtils extends JavaPlugin {
|
||||
commandWandSelection = new CommandWandSelection(this);
|
||||
commandStaff = new CommandStaff(this);
|
||||
commandCubo = new CommandCubo(this);
|
||||
commandBroadcast = new CommandBroadcast(this);
|
||||
|
||||
commandAliasManager = new CommandAliasManager(this);
|
||||
spawnTimeManager = new SpawnTimeManager(this);
|
||||
@@ -102,6 +105,10 @@ public class PandacraftUtils extends JavaPlugin {
|
||||
commandPing = null;
|
||||
commandMe = null;
|
||||
commandSpeedMessage = null;
|
||||
commandWandSelection = null;
|
||||
commandStaff = null;
|
||||
commandCubo = null;
|
||||
commandBroadcast = null;
|
||||
|
||||
commandAliasManager = null;
|
||||
spawnTimeManager = null;
|
||||
|
@@ -0,0 +1,29 @@
|
||||
package net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.broadcast;
|
||||
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public class CommandBroadcast implements CommandExecutor {
|
||||
|
||||
private PandacraftUtils plugin;
|
||||
|
||||
public CommandBroadcast(PandacraftUtils pl) {
|
||||
plugin = pl;
|
||||
plugin.getCommand("broadcast").setExecutor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (args.length == 0) return false;
|
||||
|
||||
plugin.getServer().broadcastMessage(ChatColor.YELLOW+"["+ChatColor.WHITE+"Pandacraft"+ChatColor.YELLOW+"] " + ChatColor.translateAlternateColorCodes('&', StringUtils.join(args, ' ')));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user