Clan is prob not saving so the attempt of joining a null clan will result in the server kicking the player to prevent a null pointer.
|
Im trying to add boomscapes clan into my source rune evolution. i have finished copying everything but there's a problem. when i restart the server and log in, the member of the clan would just get a message saying "You have been kicked from the clan" then when you try clicking the join button from the clan it would just say you arent in a clan anymore.
When I restart (It doesnt happen if you only relog, just when you restart)
I tried it on the original source and it works fine there but not when I copy it.
Also its perfectly fine for the owner of the clan. only the members get this. help please
Clan is prob not saving so the attempt of joining a null clan will result in the server kicking the player to prevent a null pointer.
I tried saving using the function boomscape has
I put that into when a player joins a clan but it just ended up changing the leader to the person that accepted the invite. everything else is the same as beforeCode:public synchronized static void saveClan(Clan clan) { try { storeSerializableClass(clan, new File(CLAN_PATH + clan.getClanName() + ".c")); } catch (Throwable e) { Logger.handle(e); } }
Try this;
Code:public static void createClan(Player player, String clanName) { clanName = Utils.formatPlayerNameForDisplay(clanName); if (player.getClanManager() != null) return; synchronized (cachedClans) { if (SerializableFilesManager.containsClan(clanName)) { player.getPackets().sendGameMessage("The clan name you tried already exists."); return; } Clan clan = new Clan(clanName, player); SerializableFilesManager.saveClan(clan); linkClanMember(player, clanName); } }
I put it in there
But nothing's changed, same problem stillCode:public static final void safeShutdown(final boolean restart, int delay) { if (exiting_start != 0) return; exiting_start = Utils.currentTimeMillis(); exiting_delay = delay; for (Player player : World.getPlayers()) { if (player == null || !player.hasStarted() || player.hasFinished()) continue; player.getPackets().sendSystemUpdate(delay); } CoresManager.slowExecutor.schedule(new Runnable() { @Override public void run() { try { for (Player player : World.getPlayers()) { ClansManager.createClan(player, player.getClanName()); if (player == null || !player.hasStarted()) continue; player.realFinish(); } IPBanL.save(); PkRank.save(); IPMute.save(); if (restart) Launcher.restart(); else Launcher.shutdown(); } catch (Throwable e) { Logger.handle(e); } } }, delay, TimeUnit.SECONDS); }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |