Package org.spout.vanilla.data.configuration

Examples of org.spout.vanilla.data.configuration.OpConfiguration


  @Permissible ("vanilla.command.deop")
  public void deop(CommandSource source, CommandArguments args) throws CommandException {
    String playerName = args.popString("player");
    args.assertCompletelyParsed();

    OpConfiguration ops = VanillaConfiguration.OPS;
    if (!ops.isOp(playerName)) {
      source.sendMessage(plugin.getPrefix() + playerName + ChatStyle.RED + " is not an operator!");
      return;
    }

    ops.setOp(playerName, false);
    source.sendMessage(plugin.getPrefix() + playerName + ChatStyle.RED + " had their operator status revoked!");
    if (getEngine() instanceof Server) {
      Player player = ((Server) getEngine()).getPlayer(playerName, true);
      if (player != null && !source.equals(player)) {
        player.sendMessage(plugin.getPrefix() + ChatStyle.RED + "You had your operator status revoked!");
View Full Code Here


  @Permissible ("vanilla.command.op")
  public void op(CommandSource source, CommandArguments args) throws CommandException {
    String playerName = args.popString("player");
    args.assertCompletelyParsed();

    OpConfiguration ops = VanillaConfiguration.OPS;
    if (ops.isOp(playerName)) {
      source.sendMessage(plugin.getPrefix() + ChatStyle.RED + playerName + " is already an operator!");
      return;
    }

    ops.setOp(playerName, true);
    source.sendMessage(plugin.getPrefix() + ChatStyle.RED + playerName + " is now an operator!");
    if (getEngine() instanceof Server) {
      Player player = ((Server) getEngine()).getPlayer(playerName, true);
      if (player != null && !source.equals(player)) {
        player.sendMessage(plugin.getPrefix() + ChatStyle.YELLOW + "You are now an operator!");
View Full Code Here

TOP

Related Classes of org.spout.vanilla.data.configuration.OpConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.