Skip to content

Commit 65717fa

Browse files
committed
JDA 4 LTS Support and Poseidon UUID support
Add support for Poseidon UUIDs and fix support for Discord Core and JDA 4 LTS
1 parent 0a19d24 commit 65717fa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/com/johnymuffin/beta/discordauth/DiscordAuthListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public DiscordAuthListener(DiscordAuthentication plugin) {
2020

2121
@Override
2222
public void onMessageReceived(MessageReceivedEvent event) {
23-
if (event.getAuthor().isBot() || event.getAuthor().isFake()) return;
23+
if (event.getAuthor().isBot() || event.isWebhookMessage()) return;
2424
String[] ags = event.getMessage().getContentRaw().split(" ");
2525
if (ags[0].toLowerCase().equals("!link")) {
2626
if (ags.length != 2) {

src/com/johnymuffin/beta/discordauth/DiscordAuthentication.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.johnymuffin.beta.discordauth.commands.DiscordAuthCommand;
44
import com.johnymuffin.discordcore.DiscordCore;
5+
import com.projectposeidon.api.PoseidonUUID;
56
import org.bukkit.Bukkit;
67
import org.bukkit.event.Event;
78
import org.bukkit.plugin.PluginDescriptionFile;
@@ -104,7 +105,7 @@ public boolean isPoseidonPresent() {
104105

105106
public UUID getPlayerUUID(String playerName) {
106107
if (poseidonPresent) {
107-
//TODO: Return UUID from Poseidon Cache
108+
return PoseidonUUID.getPlayerGracefulUUID(playerName);
108109
}
109110
return UUID.fromString(playerName);
110111
}

src/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: DiscordAuthentication
22
main: com.johnymuffin.beta.discordauth.DiscordAuthentication
33
author: JohnyMuffin
4-
version: 1.1.1
4+
version: 1.1.2
55
depend: [DiscordCore]
66
commands:
77
discordauth:

0 commit comments

Comments
 (0)