/manuadd command
This commit is contained in:
snowleo 2011-06-07 00:54:36 +02:00
parent 4f16c8b5a7
commit 4bfc8e1459
8 changed files with 83 additions and 7 deletions

View File

@ -622,6 +622,20 @@ is divided into following sections:
<param name="call.target" value="jar"/>
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-jar.properties}"/>
<param location="${project.EssentialsGroupBridge}" name="call.subproject"/>
<param location="${project.EssentialsGroupBridge}/build.xml" name="call.script"/>
<param name="call.target" value="jar"/>
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-jar.properties}"/>
<param location="${project.EssentialsGroupManager}" name="call.subproject"/>
<param location="${project.EssentialsGroupManager}/build.xml" name="call.script"/>
<param name="call.target" value="jar"/>
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-jar.properties}"/>
<param location="${project.EssentialsPermissionsCommands}" name="call.subproject"/>
@ -1107,6 +1121,20 @@ is divided into following sections:
<param name="call.target" value="clean"/>
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-clean.properties}"/>
<param location="${project.EssentialsGroupBridge}" name="call.subproject"/>
<param location="${project.EssentialsGroupBridge}/build.xml" name="call.script"/>
<param name="call.target" value="clean"/>
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-clean.properties}"/>
<param location="${project.EssentialsGroupManager}" name="call.subproject"/>
<param location="${project.EssentialsGroupManager}/build.xml" name="call.script"/>
<param name="call.target" value="clean"/>
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-clean.properties}"/>
<param location="${project.EssentialsPermissionsCommands}" name="call.subproject"/>

View File

@ -1,8 +1,8 @@
build.xml.data.CRC32=2eb9432b
build.xml.data.CRC32=2bd2dd75
build.xml.script.CRC32=7a797370
build.xml.stylesheet.CRC32=28e38971@1.43.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=2eb9432b
nbproject/build-impl.xml.script.CRC32=f6f34008
nbproject/build-impl.xml.data.CRC32=2bd2dd75
nbproject/build-impl.xml.script.CRC32=769e541b
nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45

View File

@ -35,7 +35,9 @@ javac.classpath=\
${reference.EssentialsPermissionsCommands.jar}:\
${reference.EssentialsSpawn.jar}:\
${reference.EssentialsGeoIP.jar}:\
${reference.EssentialsXMPP.jar}
${reference.EssentialsXMPP.jar}:\
${reference.EssentialsGroupBridge.jar}:\
${reference.EssentialsGroupManager.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
@ -67,6 +69,8 @@ platform.active=default_platform
project.Essentials=../Essentials
project.EssentialsChat=../EssentialsChat
project.EssentialsGeoIP=../EssentialsGeoIP
project.EssentialsGroupBridge=../EssentialsGroupBridge
project.EssentialsGroupManager=../EssentialsGroupManager
project.EssentialsPermissionsCommands=../EssentialsPermissionsCommands
project.EssentialsProtect=../EssentialsProtect
project.EssentialsSpawn=../EssentialsSpawn
@ -74,6 +78,8 @@ project.EssentialsXMPP=../EssentialsXMPP
reference.Essentials.jar=${project.Essentials}/dist/Essentials.jar
reference.EssentialsChat.jar=${project.EssentialsChat}/dist/EssentialsChat.jar
reference.EssentialsGeoIP.jar=${project.EssentialsGeoIP}/dist/EssentialsGeoIP.jar
reference.EssentialsGroupBridge.jar=${project.EssentialsGroupBridge}/dist/EssentialsGroupBridge.jar
reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar
reference.EssentialsPermissionsCommands.jar=${project.EssentialsPermissionsCommands}/dist/EssentialsPermissionsCommands.jar
reference.EssentialsProtect.jar=${project.EssentialsProtect}/dist/EssentialsProtect.jar
reference.EssentialsSpawn.jar=${project.EssentialsSpawn}/dist/EssentialsSpawn.jar

View File

@ -39,6 +39,22 @@
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGroupBridge</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsGroupManager</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>EssentialsPermissionsCommands</foreign-project>
<artifact-type>jar</artifact-type>

View File

@ -115,7 +115,7 @@ public class Essentials extends JavaPlugin implements IEssentials
backup = new Backup(this);
essDep = new EssentialsDependancyChecker(this);
PluginManager pm = getServer().getPluginManager();
final PluginManager pm = getServer().getPluginManager();
for (Plugin plugin : pm.getPlugins())
{
if (plugin.getDescription().getName().startsWith("Essentials"))

View File

@ -1,6 +1,7 @@
package com.earth2me.essentials.permissions;
import com.earth2me.essentials.commands.EssentialsCommand;
import com.earth2me.essentials.commands.NotEnoughArgumentsException;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@ -15,7 +16,13 @@ public class Commandmanuadd extends EssentialsCommand
@Override
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{
if (args.length < 2)
{
throw new NotEnoughArgumentsException();
}
final String player = args[0];
final String group = args[1];
ess.getServer().dispatchCommand(sender, "/permissions "+player+" parents add "+group+"");
}

View File

@ -1,16 +1,35 @@
package com.earth2me.essentials.permissions;
import com.earth2me.essentials.Essentials;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.Permissions.Permissions;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsPermissionsCommands extends JavaPlugin
{
private static PermissionHandler permissionHandler = null;
public static PermissionHandler getPermissionHandler()
{
return permissionHandler;
}
@Override
public void onEnable()
{
final PluginManager pluginManager = getServer().getPluginManager();
final Plugin permissionsPlugin = pluginManager.getPlugin("Permissions");
if (permissionsPlugin != null
&& permissionsPlugin.getDescription().getVersion().charAt(0) == '3')
{
permissionHandler = ((Permissions)permissionsPlugin).getHandler();
}
}
@Override

View File

@ -1,5 +1,5 @@
# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
name: Essentials
name: EssentialsPermissionsCommands
main: com.earth2me.essentials.permissions.EssentialsPermissionsCommands
# Note to developers: This next line cannot change, or the automatic versioning system will break.
version: TeamCity