API Surface (5)
UserListEntry<GameProfile> createEntry(JsonObject entryData)
boolean isBanned(GameProfile profile)
String[] getKeys()
String getObjectKey(GameProfile obj)
GameProfile isUsernameBanned(String username)
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 UserListBans extends UserList<GameProfile, UserListBansEntry>
|
| 8 | {
|
| 9 | public UserListBans(File bansFile)
|
| 10 | {
|
| 11 | super(bansFile);
|
| 12 | }
|
| 13 |
|
| 14 | protected UserListEntry<GameProfile> createEntry(JsonObject entryData)
|
| 15 | {
|
| 16 | return new UserListBansEntry(entryData);
|
| 17 | }
|
| 18 |
|
| 19 | public boolean isBanned(GameProfile profile)
|
| 20 | {
|
| 21 | return this.hasEntry(profile);
|
| 22 | }
|
| 23 |
|
| 24 | public String[] getKeys()
|
| 25 | {
|
| 26 | String[] astring = new String[this.getValues().size()];
|
| 27 | int i = 0;
|
| 28 |
|
| 29 | for (UserListBansEntry userlistbansentry : this.getValues().values())
|
| 30 | {
|
| 31 | astring[i++] = ((GameProfile)userlistbansentry.getValue()).getName();
|
| 32 | }
|
| 33 |
|
| 34 | return astring;
|
| 35 | }
|
| 36 |
|
| 37 | /**
|
| 38 | * Gets the key value for the given object
|
| 39 | */
|
| 40 | protected String getObjectKey(GameProfile obj)
|
| 41 | {
|
| 42 | return obj.getId().toString();
|
| 43 | }
|
| 44 |
|
| 45 | public GameProfile isUsernameBanned(String username)
|
| 46 | {
|
| 47 | for (UserListBansEntry userlistbansentry : this.getValues().values())
|
| 48 | {
|
| 49 | if (username.equalsIgnoreCase(((GameProfile)userlistbansentry.getValue()).getName()))
|
| 50 | {
|
| 51 | return (GameProfile)userlistbansentry.getValue();
|
| 52 | }
|
| 53 | }
|
| 54 |
|
| 55 | return null;
|
| 56 | }
|
| 57 | }
|
| 58 |
|
Deobfuscated MCP 1.8.9 source of UserListBans from Marcelektro/MavenMCP-1.8.9 (net/minecraft/server/management/UserListBans.java), stored verbatim.