Small thing for your bug tracker, placing a block in the town thats not on my residence says &&/town&& as was previously reported by staff. I thought the bug tracker said it was fixed but maybe this is another bug.
Stop trying to place blocks in town then! Fixed means we have it fixed in our code, not necessarily running on the servers.
Lol Okay. I Just seen it by accident and remembered it was on the list. Thought i would alert yalls to a potential screw up.
Taking a while to fix it because we have massive 'hope residence permissions dont totally blow up' changes pending for name change support that we have to extensively test first... Gigantic amount of code changed yet again for next update.
Aikar, name changes sounded good an all but the existing shop-signs sounds like a drag . Goodluck though.
Code: this.ownerUserId = isAdminShop(sign.getLine(0)) ? 0L : BlockUtil.getUserIdFromOldNameBasedSign(sign, 0); public static Long getUserIdFromOldNameBasedSign(Sign sign, int line) { if (sign == null) { return null; } String sline = sign.getLine(line); Long userId = getUserIdFromSign(sline); if (userId == null) { userId = Caches.oldNameHistoryLookup.getIfPresent(sline); if (userId == null) { Residence residence = Residence.getResidence(sign.getLocation()); if (residence != null && residence.getOwner().startsWith(sline)) { userId = residence.ownerUserId; setUserIdOnSign(sign, line, userId); return userId; } try { // Try direct name userId = EmpireDb.getFirstColumn( "SELECT user_id FROM user_identity_history WHERE name = ? ORDER BY first_seen LIMIT 1", sline); // Try loose if 16 char name if (userId == null && sline.length() == 15) { userId = EmpireDb.getFirstColumn( "SELECT user_id FROM user_identity_history WHERE name like ? ORDER BY first_seen LIMIT 1", sline + "%"); } Caches.oldNameHistoryLookup.put(sline, userId != null ? userId : 0L); } catch (SQLException e) { Util.printException(e); } } else if (userId == 0L) { userId = null; } if (userId != null) { setUserIdOnSign(sign, line, userId); } } return userId; } It's handled And even supports case of "User A Changed to B, C changed to A" still attributing to A instead of C
Nice indeed. Not much of a java guru, if any at all, but i do understand the SQL and the fundamentals behind it
B4DMAN5IMON's username is both green and lime green. I'm about to post something else on the wiki forums.
It's still lime green in the TAB list; it's just a bit faded and at the very end because he's performing magic.