Ajout de certains alias de commandes + ajout de la commande /broadcast
This commit is contained in:
parent
7e7c98fe8a
commit
1e9dae8dbe
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<jardesc>
|
<jardesc>
|
||||||
<jar path="PandacraftUtils/jar_export/PandacraftUtils-2.9.jar"/>
|
<jar path="PandacraftUtils/jar_export/PandacraftUtils-2.10.jar"/>
|
||||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/PandacraftUtils/make_jar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
<options buildIfNeeded="true" compress="true" descriptionLocation="/PandacraftUtils/make_jar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||||
<selectedProjects/>
|
<selectedProjects/>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: PandacraftUtils
|
name: PandacraftUtils
|
||||||
main: net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils
|
main: net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils
|
||||||
version: 2.9
|
version: 2.10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -54,10 +54,14 @@ commands:
|
|||||||
description: Gère les protections de la map Survie
|
description: Gère les protections de la map Survie
|
||||||
usage: /cubo
|
usage: /cubo
|
||||||
permission: pandacraft.cubo
|
permission: pandacraft.cubo
|
||||||
|
broadcast:
|
||||||
|
description: Envoi un message sur tout le serveur
|
||||||
|
usage: /broadcast <message>
|
||||||
|
permission: pandacraft.broadcast
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# les permissions marqués par le commentaire "# à ajouter" sont à ajouter dans le fichier d'organisation des permissions
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
||||||
@ -119,6 +123,11 @@ permissions:
|
|||||||
pandacraft.afk.exempt.autoafk:
|
pandacraft.afk.exempt.autoafk:
|
||||||
description: Ne pas être auto AFK
|
description: Ne pas être auto AFK
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
|
# à ajouter ######################
|
||||||
|
pandacraft.broadcast:
|
||||||
|
description: Utiliser la commande broadcast
|
||||||
|
default: op
|
||||||
|
|
||||||
|
|
||||||
pandacraft.antispam.exempt:
|
pandacraft.antispam.exempt:
|
||||||
|
@ -216,6 +216,24 @@ public class ConfigManager {
|
|||||||
alias.put("replaceWith", "/ptime");
|
alias.put("replaceWith", "/ptime");
|
||||||
alias.put("permissions", "pandacraft.grade.users");
|
alias.put("permissions", "pandacraft.grade.users");
|
||||||
CommandAlias_alias.add(alias);
|
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>();
|
Map<String, String> alias = new HashMap<String, String>();
|
||||||
alias.put("initialCommand", "");
|
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.login_message.LoginLogoutManager;
|
||||||
import net.mc_pandacraft.java.plugin.pandacraftutils.player_count_list.PacketOutServerInfoListener;
|
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._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.list.CommandList;
|
||||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.me.CommandMe;
|
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.me.CommandMe;
|
||||||
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.ping.CommandPing;
|
import net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.ping.CommandPing;
|
||||||
@ -42,6 +43,7 @@ public class PandacraftUtils extends JavaPlugin {
|
|||||||
public CommandWandSelection commandWandSelection;
|
public CommandWandSelection commandWandSelection;
|
||||||
public CommandStaff commandStaff;
|
public CommandStaff commandStaff;
|
||||||
public CommandCubo commandCubo;
|
public CommandCubo commandCubo;
|
||||||
|
public CommandBroadcast commandBroadcast;
|
||||||
|
|
||||||
public CommandAliasManager commandAliasManager;
|
public CommandAliasManager commandAliasManager;
|
||||||
public SpawnTimeManager spawnTimeManager;
|
public SpawnTimeManager spawnTimeManager;
|
||||||
@ -80,6 +82,7 @@ public class PandacraftUtils extends JavaPlugin {
|
|||||||
commandWandSelection = new CommandWandSelection(this);
|
commandWandSelection = new CommandWandSelection(this);
|
||||||
commandStaff = new CommandStaff(this);
|
commandStaff = new CommandStaff(this);
|
||||||
commandCubo = new CommandCubo(this);
|
commandCubo = new CommandCubo(this);
|
||||||
|
commandBroadcast = new CommandBroadcast(this);
|
||||||
|
|
||||||
commandAliasManager = new CommandAliasManager(this);
|
commandAliasManager = new CommandAliasManager(this);
|
||||||
spawnTimeManager = new SpawnTimeManager(this);
|
spawnTimeManager = new SpawnTimeManager(this);
|
||||||
@ -102,6 +105,10 @@ public class PandacraftUtils extends JavaPlugin {
|
|||||||
commandPing = null;
|
commandPing = null;
|
||||||
commandMe = null;
|
commandMe = null;
|
||||||
commandSpeedMessage = null;
|
commandSpeedMessage = null;
|
||||||
|
commandWandSelection = null;
|
||||||
|
commandStaff = null;
|
||||||
|
commandCubo = null;
|
||||||
|
commandBroadcast = null;
|
||||||
|
|
||||||
commandAliasManager = null;
|
commandAliasManager = null;
|
||||||
spawnTimeManager = 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user