Thread: "You have been kicked from the clan" BoomScape Clan problem

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 "You have been kicked from the clan" BoomScape Clan problem 
    Registered Member
    Join Date
    Feb 2015
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    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
    Reply With Quote  
     

  2. #2  
    Registered Member Blackmoon's Avatar
    Join Date
    Jun 2014
    Posts
    633
    Thanks given
    47
    Thanks received
    107
    Rep Power
    42
    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.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2015
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Kethsi View Post
    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.

    Where could i have messed up that it doesnt save?
    Reply With Quote  
     

  4. #4  
    Registered Member Blackmoon's Avatar
    Join Date
    Jun 2014
    Posts
    633
    Thanks given
    47
    Thanks received
    107
    Rep Power
    42
    Quote Originally Posted by ProdTheSpec View Post
    Where could i have messed up that it doesnt save?
    You can save clans on the server shutdown hook, or every X minutes. Check Launcher.java and World.java
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Feb 2015
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Kethsi View Post
    You can save clans on the server shutdown hook, or every X minutes. Check Launcher.java and World.java
    I tried saving using the function boomscape has
    Code:
    	public synchronized static void saveClan(Clan clan) {
    		try {
    			storeSerializableClass(clan, new File(CLAN_PATH + clan.getClanName() + ".c"));
    		}
    		catch (Throwable e) {
    			Logger.handle(e);
    		}
    	}
    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 before
    Reply With Quote  
     

  6. #6  
    Registered Member Blackmoon's Avatar
    Join Date
    Jun 2014
    Posts
    633
    Thanks given
    47
    Thanks received
    107
    Rep Power
    42
    Quote Originally Posted by ProdTheSpec View Post
    I tried saving using the function boomscape has
    Code:
    	public synchronized static void saveClan(Clan clan) {
    		try {
    			storeSerializableClass(clan, new File(CLAN_PATH + clan.getClanName() + ".c"));
    		}
    		catch (Throwable e) {
    			Logger.handle(e);
    		}
    	}
    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 before
    Try adding it in the shutdown hook.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Feb 2015
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Kethsi View Post
    Try adding it in the shutdown hook.
    I tried but its asking for a specific clan only
    Reply With Quote  
     

  8. #8  
    Registered Member Blackmoon's Avatar
    Join Date
    Jun 2014
    Posts
    633
    Thanks given
    47
    Thanks received
    107
    Rep Power
    42
    Quote Originally Posted by ProdTheSpec View Post
    I tried but its asking for a specific clan only
    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);
    	}
        }
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Feb 2015
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Kethsi View Post
    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
    Code:
    	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);
    	}
    But nothing's changed, same problem still
    Reply With Quote  
     

  10. #10  
    EradicationX's Owner
    Eradication-X's Avatar
    Join Date
    Jan 2014
    Posts
    259
    Thanks given
    69
    Thanks received
    44
    Rep Power
    23
    You probably didn't copy it all
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. You Have Been Quoted
    By Aymen in forum Suggestions
    Replies: 47
    Last Post: 02-18-2013, 12:25 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •