Created
September 16, 2015 02:30
-
-
Save Techcable/e8589420521f8aa7f532 to your computer and use it in GitHub Desktop.
GroupManger Stupidity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public UserData getUser(UUID userId) { | |
| if (getUsers().containsKey(userId)) { | |
| return getUsers().get(userId); | |
| } | |
| // No user account found so create a new one. | |
| UserData newUser = createUser(userId); | |
| return newUser; | |
| } | |
| public UserData createUser(UUID userId) { | |
| if (getUsers().containsKey(userId)) { | |
| return null; | |
| } | |
| UserData newUser = new UserData(this, GroupManager.getInstance().getUserManager().getUser(userId)); | |
| newUser.setGroup(groups.getDefaultGroup(), false); | |
| addUser(newUser); | |
| setUsersChanged(true); | |
| return newUser; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment