Hello, I've been working on code for a warp plugin. Everything works aside from 1 thing, where it changes the amount of warps a player can have. Basically what it should do, is if the player is VIP "VIP.IsVIP" the amount of warps they get should change. Default should have 3 warps etc. Any ideas on why this doesn't work? And if so, how to fix it? Would help me out a lot. Code: /* */ public static boolean SetWarp(String playerName, String warpName, Location location) /* */ { /* 138 */ Hashtable<String, Location> warpList = GetWarpList(playerName); /* */ /* 141 */ if (!warpList.containsKey(warpName)) /* */ { int maxWarps = 3; /* 145 */ if (MVP.IsPREM(playerName)) { /* 146 */ maxWarps = 20; /* 147 */ } else if (VIP.IsElite(playerName)) { /* 148 */ maxWarps = 15; /* 147 */ } else if (MVP.IsMVP(playerName)) { /* 148 */ maxWarps = 12; /* 147 */ } else if (VIP.IsVIP(playerName)) { /* 148 */ maxWarps = 8; /* */ } /* */ /* 151 */ if ((maxWarps == -1) || (warpList.keySet().size() >= maxWarps)) { /* 152 */ return false; /* */ } /* */ } /* 155 */ warpList.put(warpName, location); /* 156 */ SaveWarps(playerName); /* 157 */ return true; /* */ }
Haha, sorry for that. I used a decompiler because I lost the source code and it added that. I use Eclipse