use of com.griefdefender.hooks.provider.clan.uclans.GDClanPlayer in project GDHooks by bloodmc.
the class UClansEventHandler method onClanPlayerJoin.
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onClanPlayerJoin(ClanGlobalEvent event) {
if (ClanEvents.PLAYERJOIN != event.getEvent()) {
return;
}
final Player player = Bukkit.getPlayer(event.getSender());
if (player == null) {
return;
}
final World world = player.getWorld();
if (!GriefDefender.getCore().isEnabled(world.getUID())) {
return;
}
((UClansProvider) GDHooks.getInstance().getClanProvider()).getClanPlayerMap().put(player.getUniqueId(), new GDClanPlayer(this.plugin.getPlayerAPI().getPlayerData(player.getUniqueId())));
}
Aggregations