Skip to content

Commit

Permalink
temp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBong committed Aug 16, 2024
1 parent b6c453a commit c37fc3f
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 168 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
java-version: '20'
distribution: 'adopt'

- name: Build Cirrus API
run: mvn install:install-file -Dfile=ace-velocity/libs/cirrus-api-3.0.0-SNAPSHOT.jar -DgroupId=dev.simplix.cirrus -DartifactId=cirrus-api -Dversion=3.0.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
- name: Build Cirrus Velocity
run: mvn install:install-file -Dfile=ace-velocity/libs/cirrus-velocity-3.0.0-SNAPSHOT.jar -DgroupId=dev.simplix.cirrus -DartifactId=cirrus-velocity -Dversion=3.0.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
# - name: Build Cirrus API
# run: mvn install:install-file -Dfile=ace-velocity/libs/cirrus-api-3.0.0-SNAPSHOT.jar -DgroupId=dev.simplix.cirrus -DartifactId=cirrus-api -Dversion=3.0.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
# - name: Build Cirrus Velocity
# run: mvn install:install-file -Dfile=ace-velocity/libs/cirrus-velocity-3.0.0-SNAPSHOT.jar -DgroupId=dev.simplix.cirrus -DartifactId=cirrus-velocity -Dversion=3.0.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true

- name: Build with Maven
run: mvn -B package --file pom.xml
Expand Down
41 changes: 26 additions & 15 deletions ace-velocity/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,32 @@
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<directory>src/main/java/resources</directory>
<includes>
<include>velocity-plugin.json</include>
</includes>
</resource>
</resources>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>scriptus</artifactId>
<version>0.2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>describe</goal>
</goals>
<configuration>
<format>git-Ace-%s</format>
<scmDirectory>${project.basedir}</scmDirectory>
<descriptionProperty>ace.desc</descriptionProperty>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
Expand All @@ -48,6 +69,10 @@
<pattern>co.aikar.</pattern>
<shadedPattern>com.bongbong.ace.co.aikar.</shadedPattern>
</relocation>
<relocation>
<pattern>dev.simplix.</pattern>
<shadedPattern>com.bongbong.ace.dev.simplix.</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
Expand Down Expand Up @@ -109,20 +134,6 @@
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.simplix.cirrus</groupId>
<artifactId>cirrus-velocity</artifactId>
<version>3.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/cirrus-velocity-3.0.0-SNAPSHOT.jar</systemPath>
</dependency>
<dependency>
<groupId>dev.simplix.cirrus</groupId>
<artifactId>cirrus-api</artifactId>
<version>3.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/cirrus-api-3.0.0-SNAPSHOT.jar</systemPath>
</dependency>
</dependencies>
<properties>
<maven.compiler.target>20</maven.compiler.target>
Expand Down
27 changes: 16 additions & 11 deletions ace-velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>



<repositories>
<repository>
<id>aikar</id>
Expand Down Expand Up @@ -49,6 +51,16 @@
<version>2.4.1</version>
<scope>provided</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>dev.simplix.cirrus</groupId>-->
<!-- <artifactId>cirrus-velocity</artifactId>-->
<!-- <version>3.0.0-SNAPSHOT</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>dev.simplix.cirrus</groupId>-->
<!-- <artifactId>cirrus-api</artifactId>-->
<!-- <version>3.0.0-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
Expand Down Expand Up @@ -83,24 +95,17 @@
<version>6.0.53</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.simplix.cirrus</groupId>
<artifactId>cirrus-velocity</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>dev.simplix.cirrus</groupId>
<artifactId>cirrus-api</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<finalName>${project.name}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<directory>src/main/java/resources</directory>
<filtering>true</filtering>
<includes>
<include>velocity-plugin.json</include>
</includes>
</resource>
</resources>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.bongbong.ace.velocity.profiles.ProfileManager;
import com.bongbong.ace.velocity.staff.StaffManager;
import com.bongbong.ace.velocity.utils.*;
import com.google.common.io.Resources;
import com.google.gson.Gson;
import com.google.inject.Inject;
import com.mongodb.ConnectionString;
import com.mongodb.MongoClientSettings;
Expand All @@ -20,12 +22,17 @@
import com.velocitypowered.api.plugin.annotation.DataDirectory;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ProxyServer;
import dev.simplix.cirrus.velocity.CirrusVelocity;
import dev.simplix.cirrus.velocity.plugin.CirrusTestCommand;
//import dev.simplix.cirrus.velocity.CirrusVelocity;
import net.elytrium.limboapi.api.LimboFactory;
import org.bson.UuidRepresentation;
import org.json.JSONObject;

import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.Optional;
import java.util.Properties;
import java.util.logging.Logger;

@Plugin(
Expand All @@ -49,6 +56,7 @@ public class AcePlugin {
public AcePlugin(ProxyServer server, Logger logger) {
this.server = server;
this.logger = logger;

}

@Subscribe
Expand Down Expand Up @@ -114,9 +122,9 @@ public void onProxyInitialization(ProxyInitializeEvent event) {

LimboFactory limboFactory = (LimboFactory) server.getPluginManager()
.getPlugin("limboapi").flatMap(PluginContainer::getInstance).orElseThrow();

new CirrusVelocity(this, server, server.getCommandManager()).init();
server.getCommandManager().register("menu", new CirrusTestCommand());
//
// new CirrusVelocity(this, server, server.getCommandManager()).init();
// server.getCommandManager().register("menu", new CirrusTestCommand());

new ProfileManager(
taskScheduler, mongo, commandManager, playerFinder, locale, redisManager, registrar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import com.bongbong.ace.velocity.staff.punishments.Punishment;
import com.bongbong.ace.velocity.staff.punishments.PunishmentManager;
import com.bongbong.ace.velocity.staff.punishments.PunishmentProfile;
import com.bongbong.ace.velocity.staff.punishments.menus.HistoryMenu;
//import com.bongbong.ace.velocity.staff.punishments.menus.HistoryMenu;
import com.bongbong.ace.velocity.utils.Colors;
import com.bongbong.ace.velocity.utils.OfflinePlayer;
import com.bongbong.ace.velocity.utils.PlayerFinder;
import com.velocitypowered.api.proxy.Player;
import dev.simplix.cirrus.velocity.wrapper.VelocityPlayerWrapper;
//import dev.simplix.cirrus.velocity.wrapper.VelocityPlayerWrapper;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.text.event.HoverEvent;

Expand All @@ -42,9 +42,9 @@ public void history(CommandIssuer issuer, PunishmentProfile target, @Optional St
if (issuerPlayer != null && (chatToggle == null || !chatToggle.contains("-dump"))) {
TreeMap<Date, Punishment> map = new TreeMap<>();
for (Punishment punishment : punishments) map.put(punishment.getIssued(), punishment);

VelocityPlayerWrapper velocityPlayerWrapper = new VelocityPlayerWrapper(issuerPlayer);
new HistoryMenu(playerFinder, map).display(velocityPlayerWrapper);
//
// VelocityPlayerWrapper velocityPlayerWrapper = new VelocityPlayerWrapper(issuerPlayer);
// new HistoryMenu(playerFinder, map).display(velocityPlayerWrapper);
return;
}

Expand Down
Loading

0 comments on commit c37fc3f

Please sign in to comment.