Пример #1
0
    @EventHandler
    public static void onName(SignInformationEvent event) {
      if (!(event.getOwner() instanceof String)) {
        return;
      }

      String owner = (String) event.getOwner();
      String strippedName = stripName(owner);

      if (config.contains(strippedName)) {
        event.setOwner(config.getString(strippedName));
      }
    }
Пример #2
0
  public void onEnable() {
    getBreeze().registerEvents(this, new NameListener());

    config =
        BreezeConfiguration.loadConfiguration(
            new File(getBreeze().getPlugin().getDataFolder(), "longName.storage"));
  }