Skip to content

Commit 14030ea

Browse files
committed
Re-add UUID parameter to register + remove old getPlayer method
1 parent 2b5a625 commit 14030ea

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

src/com/namelessmc/NamelessAPI/NamelessAPI.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,6 @@ public NamelessPlayer getPlayer(UUID uuid) throws NamelessException {
157157
return new NamelessPlayer(uuid, apiUrl);
158158
}
159159

160-
/*
161-
* @deprecated Use {@link #NamelessPlayer(UUID, URL)}. Only supported in earlier api versions.
162-
*/
163-
@Deprecated
164-
public NamelessPlayer getPlayer(String username) throws NamelessException {
165-
return new NamelessPlayer(username, apiUrl);
166-
}
167-
168160
static String encode(Object object) {
169161
try {
170162
return URLEncoder.encode(object.toString(), "UTF-8");

src/com/namelessmc/NamelessAPI/NamelessPlayer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ public final class NamelessPlayer {
2929
* Creates a new NamelessPlayer object. This constructor should not be called in the main server thread.
3030
* @param uuid
3131
* @param baseUrl Base API URL: <i>http(s)://yoursite.com/api/v2/API_KEY<i>
32-
* @throws NamelessException
33-
* @see #NamelessPlayer(String, URL)
32+
* @throws NamelessException
3433
*/
3534
NamelessPlayer(UUID uuid, URL baseUrl) throws NamelessException {
3635
this.uuid = uuid;
@@ -255,7 +254,7 @@ public void setGroup(int groupId) throws NamelessException {
255254
* <br>Email verification enabled: An empty string (the user needs to check their email to complete registration)
256255
* @throws NamelessException
257256
*/
258-
public String register(String minecraftName, String email) throws NamelessException {
257+
public String register(String minecraftName, String email, UUID uuid) throws NamelessException {
259258
final String[] parameters = new ParameterBuilder().add("username", minecraftName).add("uuid", uuid).add("email", email).build();
260259
final Request request = new Request(baseUrl, Action.REGISTER, parameters);
261260
request.connect();

0 commit comments

Comments
 (0)