mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-12-04 16:43:53 +01:00
2b156e3c9c
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: abeafb0 Updated Upstream (Paper) Origami Changes: e204bb8 Update Paper Purpur Changes: c7b279f Updated Upstream (Paper & Tuinity)
93 lines
2.6 KiB
Diff
93 lines
2.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Sat, 1 Aug 2020 15:52:50 -0500
|
|
Subject: [PATCH] Add GameProfileLookupEvent
|
|
|
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
index 89542d52c14cc009d8bf50f446ab2bebb8516c94..3e6971d0bbc383e4639e402c076af5292ee9236a 100644
|
|
--- a/pom.xml
|
|
+++ b/pom.xml
|
|
@@ -52,6 +52,10 @@
|
|
<id>sonatype</id>
|
|
<url>https://oss.sonatype.org/content/groups/public/</url>
|
|
</repository>
|
|
+ <repository>
|
|
+ <id>mojang</id>
|
|
+ <url>https://libraries.minecraft.net/</url>
|
|
+ </repository>
|
|
</repositories>
|
|
|
|
<pluginRepositories>
|
|
@@ -62,6 +66,13 @@
|
|
</pluginRepositories>
|
|
|
|
<dependencies>
|
|
+ <!-- Authlib for Gameprofiles -->
|
|
+ <dependency>
|
|
+ <groupId>com.mojang</groupId>
|
|
+ <artifactId>authlib</artifactId>
|
|
+ <version>1.5.25</version>
|
|
+ <scope>provided</scope>
|
|
+ </dependency>
|
|
<dependency>
|
|
<groupId>it.unimi.dsi</groupId>
|
|
<artifactId>fastutil</artifactId>
|
|
diff --git a/src/main/java/dev/tr7zw/yatopia/events/GameProfileLookupEvent.java b/src/main/java/dev/tr7zw/yatopia/events/GameProfileLookupEvent.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..313fe42442a93db76f91eaab50a345340f314fa8
|
|
--- /dev/null
|
|
+++ b/src/main/java/dev/tr7zw/yatopia/events/GameProfileLookupEvent.java
|
|
@@ -0,0 +1,51 @@
|
|
+package dev.tr7zw.yatopia.events;
|
|
+
|
|
+import com.mojang.authlib.GameProfile;
|
|
+import java.util.UUID;
|
|
+import org.bukkit.event.Event;
|
|
+import org.bukkit.event.HandlerList;
|
|
+import org.jetbrains.annotations.NotNull;
|
|
+import org.jetbrains.annotations.Nullable;
|
|
+
|
|
+public class GameProfileLookupEvent extends Event {
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
+ private GameProfile gameProfile = null;
|
|
+ private final UUID uuid;
|
|
+ private final String name;
|
|
+
|
|
+ public GameProfileLookupEvent(boolean async, @NotNull UUID uuid, @NotNull String name) {
|
|
+ super(async);
|
|
+ this.uuid = uuid;
|
|
+ this.name = name;
|
|
+ }
|
|
+
|
|
+ @Nullable
|
|
+ public GameProfile getGameProfile() {
|
|
+ return gameProfile;
|
|
+ }
|
|
+
|
|
+ public void setGameProfile(@Nullable GameProfile gameProfile) {
|
|
+ this.gameProfile = gameProfile;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ public UUID getUuid() {
|
|
+ return uuid;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ public String getName() {
|
|
+ return name;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ @Override
|
|
+ public HandlerList getHandlers() {
|
|
+ return handlers;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ public static HandlerList getHandlerList() {
|
|
+ return handlers;
|
|
+ }
|
|
+}
|