mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 11:00:43 +01:00
Adding user permission alias
This commit is contained in:
parent
5d925aa338
commit
f5fac6f9f5
@ -0,0 +1,29 @@
|
||||
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;
|
||||
|
||||
|
||||
public class Commandmanuaddp extends EssentialsCommand
|
||||
{
|
||||
public Commandmanuaddp()
|
||||
{
|
||||
super("manuaddp");
|
||||
}
|
||||
|
||||
@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 perm = args[1];
|
||||
ess.getServer().dispatchCommand(sender, "/permissions "+player+" perms add "+perm+"");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
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;
|
||||
|
||||
|
||||
public class Commandmanudelp extends EssentialsCommand
|
||||
{
|
||||
public Commandmanudelp()
|
||||
{
|
||||
super("manudelp");
|
||||
}
|
||||
|
||||
@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 perm = args[1];
|
||||
ess.getServer().dispatchCommand(sender, "/permissions "+player+" perms remove "+perm+"");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -10,7 +10,7 @@ public class Commandmanudelsub extends EssentialsCommand
|
||||
{
|
||||
public Commandmanudelsub()
|
||||
{
|
||||
super("manudel");
|
||||
super("manudelsub");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,28 @@
|
||||
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;
|
||||
|
||||
|
||||
public class Commandmanulistp extends EssentialsCommand
|
||||
{
|
||||
public Commandmanulistp()
|
||||
{
|
||||
super("manuaddp");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||
{
|
||||
if (args.length < 1)
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
final String player = args[0];
|
||||
ess.getServer().dispatchCommand(sender, "/permissions "+player+" perms list");
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user