l2jkain Posted January 17, 2018 Share Posted January 17, 2018 (edited) Hello, I'm doing a protection for tvt event, but I'm trying to get someone to help me? if removing else does not work public static void AddTvTSpawnInfo(String name, int _x, int _y, int _z) { if(!CheckTvTSpawnInfo(name)) { String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1"; TvTPlayerList.add(temp); } else { Object[] elements = TvTPlayerList.toArray(); for(int i=0; i < elements.length ; i++) { Splitter = ((String) elements[i]).split(":"); String nameVal = Splitter[0]; if (name.equals(nameVal)) { GetTvTSpawnInfo(name); if (_x == xx && _y == yy && _z == zz && _player.isAttackingNow() == false && _player.isCastingNow() == false && _player.isOnline() == true) { ++SameLoc; if (SameLoc >= 4)//Kick after 4 same x/y/z, location checks { //kick here TvTPlayerList.remove(i); _player.logout(); return; } else { TvTPlayerList.remove(i); String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":" + SameLoc; TvTPlayerList.add(temp); return; } } TvTPlayerList.remove(i); String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1"; TvTPlayerList.add(temp); } } } } Edited January 17, 2018 by l2jkain Quote Link to comment Share on other sites More sharing options...
0 TeodosTv Posted January 17, 2018 Share Posted January 17, 2018 what pack u use?? Quote Link to comment Share on other sites More sharing options...
0 l2jkain Posted January 17, 2018 Author Share Posted January 17, 2018 25 minutes ago, TeodosTv said: what pack u use?? aCis Quote Link to comment Share on other sites More sharing options...
0 SweeTs Posted January 18, 2018 Share Posted January 18, 2018 It's just a warning, code style. Follow eclipse tip and format your code to be more readable if needed, ctrl shift f. Quote Link to comment Share on other sites More sharing options...
Question
l2jkain
Hello, I'm doing a protection for tvt event, but I'm trying to get someone to help me? if removing else does not work
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.