The best plugin totem ! - 1.7.10 - 1.16
public class ClassExemple implements Listener {
@EventHandler
public void onRegister(TotemRegisterEvent event) {
event.setFactionListener(new MyCustomPlugin());
}
public class MyCustomPlugin implements FactionListener {
// Retrieve the name of your faction or your team with this method, you
// have the choice between using a Player or the name of a player, in
// the plugin it will be the Player which will be used for both methods.
@Override
public String getFactionTag(Player player) {
return getFactionTag(player.getName());
}
@Override
public String getFactionTag(String player) {
return null;
}
@Override
public List getOnlinePlayer(String player) {
return null;
}
@Override
public List getOnlinePlayer(Player player) {
return getOnlinePlayer(player.getCustomName());
}
@Override
public void factionTagChange(TotemFaction totemFaction, String newName) {
manager.updateFaction(totemFaction, newName);
}
@EventHandler
public void youEvet(Event event) {
TotemFaction totemFaction = TotemManager.getInstance().getFaction("you faction tag");
String newName = "youNewName";
this.factionTagChange(totemFaction, newName);
}
}
}