@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)); } }
public void onEnable() { getBreeze().registerEvents(this, new NameListener()); config = BreezeConfiguration.loadConfiguration( new File(getBreeze().getPlugin().getDataFolder(), "longName.storage")); }