mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-19 11:31:03 +02:00
Adding some GM aliases
This commit is contained in:
parent
dea44d7cbc
commit
8136179e55
@ -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 Commandmangadd extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmangadd()
|
||||||
|
{
|
||||||
|
super("mangadd");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||||
|
{
|
||||||
|
if (args.length < 1)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
final String group = args[0];
|
||||||
|
|
||||||
|
ess.getServer().dispatchCommand(sender, "/permissions g:"+group+" create");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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 Commandmangaddi extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmangaddi()
|
||||||
|
{
|
||||||
|
super("mangaddi");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||||
|
{
|
||||||
|
if (args.length < 2)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
final String target = args[0];
|
||||||
|
final String group = args[1];
|
||||||
|
ess.getServer().dispatchCommand(sender, "/permissions g:"+target+" parents add "+group+"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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 Commandmangdel extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmangdel()
|
||||||
|
{
|
||||||
|
super("mangdel");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||||
|
{
|
||||||
|
if (args.length < 1)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
final String group = args[0];
|
||||||
|
ess.getServer().dispatchCommand(sender, "/permissions g:"+group+" delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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 Commandmangdeli extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmangdeli()
|
||||||
|
{
|
||||||
|
super("mangdeli");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||||
|
{
|
||||||
|
if (args.length < 2)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
final String target = args[0];
|
||||||
|
final String group = args[1];
|
||||||
|
ess.getServer().dispatchCommand(sender, "/permissions g:"+target+" parents remove "+group+"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -22,6 +22,7 @@ public class Commandmanuadd extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
final String player = args[0];
|
final String player = args[0];
|
||||||
final String group = args[1];
|
final String group = args[1];
|
||||||
|
//TODO: Make this command add a player if it doesnt exist /permissions +player+ create
|
||||||
ess.getServer().dispatchCommand(sender, "/permissions "+player+" parents add "+group+"");
|
ess.getServer().dispatchCommand(sender, "/permissions "+player+" parents add "+group+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 Commandmanuaddsub extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmanuaddsub()
|
||||||
|
{
|
||||||
|
super("manuaddsub");
|
||||||
|
}
|
||||||
|
|
||||||
|
@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+"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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 Commandmanudel extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmanudel()
|
||||||
|
{
|
||||||
|
super("manudel");
|
||||||
|
}
|
||||||
|
|
||||||
|
@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+" delete");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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 Commandmanudelsub extends EssentialsCommand
|
||||||
|
{
|
||||||
|
public Commandmanudelsub()
|
||||||
|
{
|
||||||
|
super("manudel");
|
||||||
|
}
|
||||||
|
|
||||||
|
@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 remove "+group+"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user