From 2e4acb721a47b77fae52e419adade1c0bb0c5d73 Mon Sep 17 00:00:00 2001 From: Gravit Date: Mon, 28 Jan 2019 22:35:49 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=9E=D1=81=D0=BD=D0=B0=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=81=D0=B5=D1=85=20Event=20U?= =?UTF-8?q?UID'=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launcher/events/request/AuthRequestEvent.java | 11 ++++++++++- .../request/BatchProfileByUsernameRequestEvent.java | 10 +++++++++- .../launcher/events/request/CheckServerEvent.java | 8 +++++++- .../events/request/JoinServerRequestEvent.java | 11 ++++++++++- .../launcher/events/request/LauncherRequestEvent.java | 11 ++++++++++- .../events/request/ProfileByUUIDRequestEvent.java | 10 +++++++++- .../events/request/ProfileByUsernameRequestEvent.java | 10 +++++++++- .../launcher/events/request/ProfilesRequestEvent.java | 9 ++++++++- .../events/request/UpdateListRequestEvent.java | 10 +++++++++- 9 files changed, 81 insertions(+), 9 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/AuthRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/AuthRequestEvent.java index 87277366..4610afa6 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/AuthRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/AuthRequestEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java index c494bfa3..cf121936 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/CheckServerEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/CheckServerEvent.java index 272308ed..3b2fbcb0 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/CheckServerEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/CheckServerEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/JoinServerRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/JoinServerRequestEvent.java index 068b5f3f..674103ea 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/JoinServerRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/JoinServerRequestEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/LauncherRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/LauncherRequestEvent.java index c939693f..52c69bf9 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/LauncherRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/LauncherRequestEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java index 5284749f..c0cdd5dd 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java index 0347cd90..ff836a30 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java @@ -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; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfilesRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfilesRequestEvent.java index de2d70f6..1ce300ae 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfilesRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/ProfilesRequestEvent.java @@ -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 profiles; public ProfilesRequestEvent(List profiles) { @@ -14,4 +17,8 @@ public ProfilesRequestEvent(List profiles) { String requesttype = "profilesList"; String error; + @Override + public UUID getUUID() { + return uuid; + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateListRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateListRequestEvent.java index 5ec26e3c..c3a1e761 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateListRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateListRequestEvent.java @@ -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; + } }