API Surface (4)
UserListEntry<GameProfile> createEntry(JsonObject entryData)
String[] getKeys()
String getObjectKey(GameProfile obj)
GameProfile getBannedProfile(String name)
Code Graph: Dependencies (3)
Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
| 1 | package net.minecraft.server.management;
|
| 2 |
|
| 3 | import com.google.gson.JsonObject;
|
| 4 | import com.mojang.authlib.GameProfile;
|
| 5 | import java.io.File;
|
| 6 |
|
| 7 | public class UserListWhitelist extends UserList<GameProfile, UserListWhitelistEntry>
|
| 8 | {
|
| 9 | public UserListWhitelist(File p_i1132_1_)
|
| 10 | {
|
| 11 | super(p_i1132_1_);
|
| 12 | }
|
| 13 |
|
| 14 | protected UserListEntry<GameProfile> createEntry(JsonObject entryData)
|
| 15 | {
|
| 16 | return new UserListWhitelistEntry(entryData);
|
| 17 | }
|
| 18 |
|
| 19 | public String[] getKeys()
|
| 20 | {
|
| 21 | String[] astring = new String[this.getValues().size()];
|
| 22 | int i = 0;
|
| 23 |
|
| 24 | for (UserListWhitelistEntry userlistwhitelistentry : this.getValues().values())
|
| 25 | {
|
| 26 | astring[i++] = ((GameProfile)userlistwhitelistentry.getValue()).getName();
|
| 27 | }
|
| 28 |
|
| 29 | return astring;
|
| 30 | }
|
| 31 |
|
| 32 | /**
|
| 33 | * Gets the key value for the given object
|
| 34 | */
|
| 35 | protected String getObjectKey(GameProfile obj)
|
| 36 | {
|
| 37 | return obj.getId().toString();
|
| 38 | }
|
| 39 |
|
| 40 | /**
|
| 41 | * Gets the GameProfile for the UserListBanEntry with the specified username, if present
|
| 42 | */
|
| 43 | public GameProfile getBannedProfile(String name)
|
| 44 | {
|
| 45 | for (UserListWhitelistEntry userlistwhitelistentry : this.getValues().values())
|
| 46 | {
|
| 47 | if (name.equalsIgnoreCase(((GameProfile)userlistwhitelistentry.getValue()).getName()))
|
| 48 | {
|
| 49 | return (GameProfile)userlistwhitelistentry.getValue();
|
| 50 | }
|
| 51 | }
|
| 52 |
|
| 53 | return null;
|
| 54 | }
|
| 55 | }
|
| 56 |
|
Deobfuscated MCP 1.8.9 source of UserListWhitelist from Marcelektro/MavenMCP-1.8.9 (net/minecraft/server/management/UserListWhitelist.java), stored verbatim.