[FEATURE] Оснащение всех Event UUID'ами

This commit is contained in:
Gravit 2019-01-28 22:35:49 +07:00
parent 1ce4b6f11b
commit 2e4acb721a
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
9 changed files with 81 additions and 9 deletions

View file

@ -2,8 +2,12 @@
import ru.gravit.launcher.ClientPermissions;
import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.utils.event.EventInterface;
public class AuthRequestEvent {
import java.util.UUID;
public class AuthRequestEvent implements EventInterface {
private static final UUID uuid = UUID.fromString("77e1bfd7-adf9-4f5d-87d6-a7dd068deb74");
public AuthRequestEvent() {
}
@ -11,4 +15,9 @@ public AuthRequestEvent() {
public ClientPermissions permissions;
public PlayerProfile playerProfile;
public String accessToken;
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,10 +1,18 @@
package ru.gravit.launcher.events.request;
import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.utils.event.EventInterface;
public class BatchProfileByUsernameRequestEvent
import java.util.UUID;
public class BatchProfileByUsernameRequestEvent implements EventInterface
{
private static final UUID uuid = UUID.fromString("c1d6729e-be2c-48cc-b5ae-af8c012232c3");
public String requesttype = "batchProfileByUsername";
public String error;
public PlayerProfile[] playerProfiles;
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,12 +1,18 @@
package ru.gravit.launcher.events.request;
import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.utils.event.EventInterface;
import java.util.UUID;
public class CheckServerEvent {
public class CheckServerEvent implements EventInterface {
private static final UUID _uuid = UUID.fromString("8801d07c-51ba-4059-b61d-fe1f1510b28a");
public String type = "success";
public String requesttype = "checkServer";
public UUID uuid;
public PlayerProfile playerProfile;
@Override
public UUID getUUID() {
return _uuid;
}
}

View file

@ -1,6 +1,11 @@
package ru.gravit.launcher.events.request;
public class JoinServerRequestEvent {
import ru.gravit.utils.event.EventInterface;
import java.util.UUID;
public class JoinServerRequestEvent implements EventInterface {
private static final UUID uuid = UUID.fromString("2a12e7b5-3f4a-4891-a2f9-ea141c8e1995");
public String type = "success";
public String requesttype = "checkServer";
@ -9,4 +14,8 @@ public JoinServerRequestEvent(boolean allow) {
}
public boolean allow;
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,6 +1,11 @@
package ru.gravit.launcher.events.request;
public class LauncherRequestEvent {
import ru.gravit.utils.event.EventInterface;
import java.util.UUID;
public class LauncherRequestEvent implements EventInterface {
private static final UUID uuid = UUID.fromString("d54cc12a-4f59-4f23-9b10-f527fdd2e38f");
public String type = "success";
public String requesttype = "launcherUpdate";
public String url;
@ -11,4 +16,8 @@ public LauncherRequestEvent(boolean needUpdate, String url) {
}
public boolean needUpdate;
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,9 +1,13 @@
package ru.gravit.launcher.events.request;
import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.utils.event.EventInterface;
public class ProfileByUUIDRequestEvent
import java.util.UUID;
public class ProfileByUUIDRequestEvent implements EventInterface
{
private static final UUID uuid = UUID.fromString("b9014cf3-4b95-4d38-8c5f-867f190a18a0");
String requesttype = "profileByUUID";
String error;
PlayerProfile playerProfile;
@ -11,4 +15,8 @@ public class ProfileByUUIDRequestEvent
public ProfileByUUIDRequestEvent(PlayerProfile playerProfile) {
this.playerProfile = playerProfile;
}
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,9 +1,13 @@
package ru.gravit.launcher.events.request;
import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.utils.event.EventInterface;
public class ProfileByUsernameRequestEvent
import java.util.UUID;
public class ProfileByUsernameRequestEvent implements EventInterface
{
private static final UUID uuid = UUID.fromString("06204302-ff6b-4779-b97d-541e3bc39aa1");
String requesttype = "profileByUsername";
String error;
PlayerProfile playerProfile;
@ -11,4 +15,8 @@ public class ProfileByUsernameRequestEvent
public ProfileByUsernameRequestEvent(PlayerProfile playerProfile) {
this.playerProfile = playerProfile;
}
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,11 +1,14 @@
package ru.gravit.launcher.events.request;
import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.utils.event.EventInterface;
import java.util.List;
import java.util.UUID;
public class ProfilesRequestEvent
public class ProfilesRequestEvent implements EventInterface
{
private static final UUID uuid = UUID.fromString("2f26fbdf-598a-46dd-92fc-1699c0e173b1");
List<ClientProfile> profiles;
public ProfilesRequestEvent(List<ClientProfile> profiles) {
@ -14,4 +17,8 @@ public ProfilesRequestEvent(List<ClientProfile> profiles) {
String requesttype = "profilesList";
String error;
@Override
public UUID getUUID() {
return uuid;
}
}

View file

@ -1,8 +1,12 @@
package ru.gravit.launcher.events.request;
import ru.gravit.launcher.hasher.HashedDir;
import ru.gravit.utils.event.EventInterface;
public class UpdateListRequestEvent {
import java.util.UUID;
public class UpdateListRequestEvent implements EventInterface {
private static final UUID uuid = UUID.fromString("5fa836ae-6b61-401c-96ac-d8396f07ec6b");
public final String type;
public final String requesttype;
public final HashedDir dir;
@ -12,4 +16,8 @@ public UpdateListRequestEvent(HashedDir dir) {
type = "success";
requesttype = "updateList";
}
@Override
public UUID getUUID() {
return uuid;
}
}