Print the "playerList". I would also just use ArrayList instead.
|
Does anybody know why the lootshare on ruse base does not work? Or atleast, seems to not work?
Sometimes 1 player gets all drops sometimes they look split but i am not sure about that.
Even when putting ccAnnounce boolean true it does not announce anything in clanchat. Can someone push me in the right direction?Code:Player toGive = player; boolean ccAnnounce = true; if(Location.inMulti(player)) { if(player.getCurrentClanChat() != null && player.getCurrentClanChat().getLootShare()) { CopyOnWriteArrayList<Player> playerList = new CopyOnWriteArrayList<Player>(); for(Player member : player.getCurrentClanChat().getMembers()) { if(member != null) { if(member.getPosition().isWithinDistance(player.getPosition())) { playerList.add(member); } } } if(playerList.size() > 0) { toGive = playerList.get(Misc.getRandom(playerList.size() - 1)); if(toGive == null || toGive.getCurrentClanChat() == null || toGive.getCurrentClanChat() != player.getCurrentClanChat()) { toGive = player; } ccAnnounce = true; } } }
Print the "playerList". I would also just use ArrayList instead.
Yes print the list and see if it holds any data. This forum isn't going to post fixes for every issue there is.
You have to find them yourself fix them yourself. You can ask for help but thats pretty much it.
This forum isn't what it used to be. Only a handful of people actually help nowadays.
Code:System.out.println(playerList.toArray());
I realise that, thank you. It sucks but it is what it is.
It prints the following:
[Ljava.lang.Object;@7480c09a
[Ljava.lang.Object;@30f56ea0
[Ljava.lang.Object;@47fb225b
[Ljava.lang.Object;@58cb7d0c
[Ljava.lang.Object;@2abdf29f
[Ljava.lang.Object;@31261906
Which to me does not make sense. It does however seem to share loot, i just can't confirm this as it does not announce it... which makes me think it does not work.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |