-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MojangAPI with skin/name bans
- Loading branch information
1 parent
d65922e
commit 9fdf877
Showing
5 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
20 changes: 20 additions & 0 deletions
20
minecord-bot/src/main/java/com/tisawesomeness/minecord/mc/player/ProfileAction.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.tisawesomeness.minecord.mc.player; | ||
|
||
import lombok.NonNull; | ||
|
||
import java.util.Optional; | ||
|
||
/** A moderation action taken against a profile */ | ||
public enum ProfileAction { | ||
FORCED_NAME_CHANGE, | ||
USING_BANNED_SKIN; | ||
|
||
public static Optional<ProfileAction> from(@NonNull String str) { | ||
for (ProfileAction action : values()) { | ||
if (action.toString().equals(str)) { | ||
return Optional.of(action); | ||
} | ||
} | ||
return Optional.empty(); | ||
} | ||
} |
This file contains 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
14 changes: 14 additions & 0 deletions
14
minecord-bot/src/test/resources/profileActionsTestResponse.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "f6489b797a9f49e2980e265a05dbc3af", | ||
"name": "Tis_awesomeness", | ||
"properties": [ | ||
{ | ||
"name": "textures", | ||
"value": "ewogICJ0aW1lc3RhbXAiIDogMTY5NDMwNTYxNTUyMiwKICAicHJvZmlsZUlkIiA6ICJmNjQ4OWI3OTdhOWY0OWUyOTgwZTI2NWEwNWRiYzNhZiIsCiAgInByb2ZpbGVOYW1lIiA6ICJUaXNfYXdlc29tZW5lc3MiLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzE5NmM4OTNmMWE2MTMxYWQ1YmE3OGZlYzI2MTg1YmM0MjRmNDA4NDE5ZTIzN2Y3YjE1ZjhhM2JjNjlhOTBhMCIKICAgIH0KICB9Cn0=" | ||
} | ||
], | ||
"profileActions": [ | ||
"FORCED_NAME_CHANGE", | ||
"USING_BANNED_SKIN" | ||
] | ||
} |