Ejemplo n.º 1
0
  @Command(
      aliases = {"grenable"},
      usage = "",
      flags = "",
      desc = "Enable guardian rune.",
      min = 0,
      max = 0)
  @CommandPermissions({"saga.user.player.guardrune.enable"})
  public static void enableGuardianStone(CommandContext args, Saga plugin, SagaPlayer sagaPlayer) {

    GuardianRune rune = sagaPlayer.getGuardRune();

    // Already enabled:
    if (rune.isEnabled()) {
      sagaPlayer.message(PlayerMessages.alreadyEnabled(rune));
      return;
    }

    // Disable:
    rune.setEnabled(true);

    // Inform:
    sagaPlayer.message(PlayerMessages.enabled(rune));
  }
Ejemplo n.º 2
0
  // Special chat:
  @Command(
      aliases = {"sc"},
      usage = "<message>",
      flags = "",
      desc = "Sends a message in the special chat.",
      min = 1)
  @CommandPermissions({"saga.special.player.chat"})
  public static void specialChat(CommandContext args, Saga plugin, SagaPlayer sagaPlayer) {

    // Send special message:
    String message =
        PlayerMessages.specialChatMessage(sagaPlayer.getName(), args.getJoinedStrings(0));

    chatMessage(message);
  }