Nameing update to zz_ for launch purposes

This commit is contained in:
nzBryce101
2024-05-11 11:05:27 +12:00
parent 7d30515539
commit bb4c677569
13 changed files with 63 additions and 48 deletions

View File

@@ -1,3 +1,4 @@
{ {
"java.compile.nullAnalysis.mode": "automatic" "java.compile.nullAnalysis.mode": "automatic",
"java.dependency.packagePresentation": "hierarchical"
} }

Binary file not shown.

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId> <groupId>com.example</groupId>
<artifactId>MCdiscord_bot</artifactId> <artifactId>MCdiscord_bot</artifactId>
<version>1.1be04</version> <version>1.1be06</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@@ -18,19 +18,33 @@
<configuration> <configuration>
<artifactSet> <artifactSet>
<includes> <includes>
<include>net.dv8tion:JDA</include> <include>com.discord4j</include>
</includes> </includes>
</artifactSet> </artifactSet>
<relocations> <relocations>
<relocation> <relocation>
<pattern>net.dv8tion</pattern> <pattern>club.minced</pattern>
<shadedPattern>com.example.MCdiscordbot.shaded.net.dv8tion</shadedPattern> <shadedPattern>com.example.MCdiscordbot.shaded.club.minced</shadedPattern>
</relocation> </relocation>
</relocations> </relocations>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>analyze-dependencies</id>
<phase>validate</phase>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration />
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
<repositories> <repositories>
@@ -48,11 +62,6 @@
<name>jcenter-bintray</name> <name>jcenter-bintray</name>
<url>https://jcenter.bintray.com</url> <url>https://jcenter.bintray.com</url>
</repository> </repository>
<repository>
<id>discordJDA</id>
<name>JDA for Discord</name>
<url>https://github.com/DV8FromTheWorld/JDA</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency> <dependency>
@@ -79,15 +88,9 @@
<version>2.23.1</version> <version>2.23.1</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>net.katsstuff</groupId>
<artifactId>ackcord-data_sjs1_2.13</artifactId>
<version>2.0.0.0-M1</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<properties> <properties>
<maven.compiler.target>21</maven.compiler.target> <maven.compiler.target>22</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.source>22</maven.compiler.source>
</properties> </properties>
</project> </project>

38
pom.xml
View File

@@ -6,13 +6,13 @@
<groupId>com.example</groupId> <groupId>com.example</groupId>
<artifactId>MCdiscord_bot</artifactId> <artifactId>MCdiscord_bot</artifactId>
<version>1.1be04</version> <version>1.1be06</version>
<packaging>jar</packaging> <!-- Specify the correct packaging type here --> <packaging>jar</packaging> <!-- Specify the correct packaging type here -->
<properties> <properties>
<!-- Specify Java version --> <!-- Specify Java version -->
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.source>22</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target> <maven.compiler.target>22</maven.compiler.target>
</properties> </properties>
<repositories> <repositories>
@@ -53,7 +53,7 @@
<dependency> <dependency>
<groupId>com.discord4j</groupId> <groupId>com.discord4j</groupId>
<artifactId>discord4j-core</artifactId> <artifactId>discord4j-core</artifactId>
<version>3.3.0-RC1</version> <version>3.2.6</version>
</dependency> </dependency>
@@ -71,14 +71,7 @@
<!-- Add other dependencies as needed --> <!-- Add other dependencies as needed -->
<dependency>
<groupId>net.katsstuff</groupId>
<artifactId>ackcord-data_sjs1_2.13</artifactId>
<version>2.0.0.0-M1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
@@ -96,7 +89,7 @@
<configuration> <configuration>
<artifactSet> <artifactSet>
<includes> <includes>
<include>club.minced.discord4j</include> <include>com.discord4j</include>
</includes> </includes>
</artifactSet> </artifactSet>
<relocations> <relocations>
@@ -109,8 +102,23 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version> <!-- Use the latest version -->
<executions>
<execution>
<id>analyze-dependencies</id>
<phase>validate</phase> <!-- Choose the appropriate phase -->
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<!-- Configuration options if needed -->
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@@ -1,9 +1,8 @@
import discord4j.core.DiscordClient; import discord4j.core.GatewayDiscordClient;
import discord4j.core.DiscordClientBuilder; import discord4j.core.DiscordClientBuilder;
import discord4j.core.event.domain.lifecycle.ReadyEvent; import discord4j.core.event.domain.lifecycle.ReadyEvent;
import discord4j.core.event.domain.message.MessageCreateEvent; import discord4j.core.event.domain.message.MessageCreateEvent;
import discord4j.core.object.presence.Activity; import discord4j.core.object.presence.*;
import discord4j.core.object.presence.Presence;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@@ -15,13 +14,13 @@ public class disMCbot {
logger.info("Starting Discord Bot..."); logger.info("Starting Discord Bot...");
String token = "MTIyNjY1NTgxODU0NDMxNjQxNw.GXAYvx.m2_ZmH-J5-iGhqdkW3M2VViG1wBQguKq-OjN80"; String token = "MTIyNjY1NTgxODU0NDMxNjQxNw.GXAYvx.m2_ZmH-J5-iGhqdkW3M2VViG1wBQguKq-OjN80";
DiscordClient client = DiscordClientBuilder.create(token).build(); GatewayDiscordClient client = DiscordClientBuilder.create(token).build().gateway().login().block();
client.login().block();
client.updatePresence(ClientPresence.online(ClientActivity.playing("Crafty Minecraft"))).subscribe();
client.getEventDispatcher().on(ReadyEvent.class) client.getEventDispatcher().on(ReadyEvent.class)
.subscribe(ready -> { .subscribe(ready -> {
System.out.println("Logged in as: " + ready.getSelf().getUsername()); System.out.println("Logged in as: " + ready.getSelf().getUsername());
client.updatePresence(Presence.online(Activity.playing("Minecraft")));
}); });
client.getEventDispatcher().on(MessageCreateEvent.class) client.getEventDispatcher().on(MessageCreateEvent.class)
@@ -33,7 +32,8 @@ public class disMCbot {
// Add more commands as needed // Add more commands as needed
}); });
client.onDisconnect().block(); client.onDisconnect().subscribe();
} }
// Other methods and event listeners can be added as needed // Other methods and event listeners can be added as needed
} }

View File

@@ -1,10 +1,9 @@
name: MCdiscord_bot-1 name: ZZ_MCdiscord_bot-1
version: 1.1be04 version: 1.1be06
main: MCdiscord_bot-1.src.main.java.disMCbot main: MCdiscord_bot-1.src.main.java.disMCbot
description: A Discord bot plugin for Minecraft. description: A Discord bot plugin for Crafty Minecraft.
author: Bryce author: Bryce
api-version: 1.20.4 api-version: 1.20.4
depend: [JDA]
# Listener Configuration # Listener Configuration
listeners: listeners:

Binary file not shown.

Binary file not shown.

View File

@@ -1,10 +1,9 @@
name: MCdiscord_bot-1 name: ZZ_MCdiscord_bot-1
version: 1.1be04 version: 1.1be06
main: MCdiscord_bot-1.src.main.java.disMCbot main: MCdiscord_bot-1.src.main.java.disMCbot
description: A Discord bot plugin for Minecraft. description: A Discord bot plugin for Crafty Minecraft.
author: Bryce author: Bryce
api-version: 1.20.4 api-version: 1.20.4
depend: [JDA]
# Listener Configuration # Listener Configuration
listeners: listeners:

View File

@@ -0,0 +1,3 @@
artifactId=MCdiscord_bot
groupId=com.example
version=1.1be06

View File

@@ -0,0 +1,2 @@
disMCbot.class
listeners\MinecraftEventListener.class

Binary file not shown.