mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-28 19:26:42 +00:00
Video man enters the scene
- Fixes multiple issues that were preventing the project from building - Fixes an issue that was causing project build class files to be included in git commits
This commit is contained in:
@ -38,4 +38,32 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<!-- Shade -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>com.discord4j:discord4j-core</include>
|
||||
<include>io.projectreactor:reactor-core</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -1,8 +1,8 @@
|
||||
package me.totalfreedom.discord.listener;
|
||||
|
||||
import discord4j.core.event.domain.message.MessageCreateEvent;
|
||||
import me.totalfreedom.discord.Bot;
|
||||
import me.totalfreedom.discord.TFD4J;
|
||||
import me.totalfreedom.discord.discord.Discord;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
@ -29,21 +29,22 @@ public class PrivateMessageListener
|
||||
{
|
||||
String code = event.getMessage().getContent().strip();
|
||||
String name;
|
||||
if (Discord.LINK_CODES.get(code) != null)
|
||||
if (tfd4j.getBot().getLinkCodes().get(code) != null)
|
||||
{
|
||||
PlayerData player = Discord.LINK_CODES.get(code);
|
||||
PlayerData player = tfd4j.getBot().getLinkCodes().get(code);
|
||||
name = player.getName();
|
||||
player.setDiscordID(event.getMessage().getAuthor().orElseThrow().getId().asString());
|
||||
|
||||
Admin admin = TotalFreedomMod.getPlugin().al.getEntryByUuid(player.getUuid());
|
||||
if (admin != null)
|
||||
{
|
||||
Discord.syncRoles(admin, player.getDiscordID());
|
||||
tfd4j.getImpl().syncRoles(admin, player.getDiscordID());
|
||||
}
|
||||
|
||||
TotalFreedomMod.getPlugin().pl.save(player);
|
||||
Discord.LINK_CODES.remove(code);
|
||||
} else
|
||||
tfd4j.getBot().getLinkCodes().remove(code);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1,31 +1,5 @@
|
||||
package me.totalfreedom.discord.util;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import discord4j.core.object.entity.Guild;
|
||||
import discord4j.core.object.entity.Message;
|
||||
import discord4j.core.object.entity.channel.Channel;
|
||||
import discord4j.core.object.entity.channel.TextChannel;
|
||||
import discord4j.core.object.reaction.ReactionEmoji;
|
||||
import discord4j.core.spec.EmbedCreateSpec;
|
||||
import discord4j.core.spec.MessageCreateSpec;
|
||||
import discord4j.discordjson.json.EmojiData;
|
||||
import discord4j.discordjson.json.ReactionData;
|
||||
import me.totalfreedom.discord.TFD4J;
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import org.apache.commons.lang.WordUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Utilities
|
||||
{
|
||||
private Utilities() {
|
||||
|
Reference in New Issue
Block a user