Skip to content

Commit

Permalink
Optimized jar file size. Removed unnecessary plugin.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro4D committed Nov 17, 2024
1 parent 0a61f25 commit c017307
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.pro4d</groupId>
<artifactId>quickmc-paper</artifactId>
<version>2.2-BETA</version>
<version>2.3-BETA</version>
<packaging>jar</packaging>

<name>QuickMC-Paper</name>
Expand Down Expand Up @@ -174,6 +174,10 @@
<id>codemc-releases</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
<repository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
</repository>
<repository>
<id>eldonexus</id>
<url>https://eldonexus.de/repository/maven-releases/</url>
Expand Down Expand Up @@ -243,6 +247,7 @@
<scope>compile</scope>
</dependency>

<!-- TO BE REMOVED-->
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
Expand All @@ -254,9 +259,10 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<scope>compile</scope>
<scope>provided</scope>
</dependency>

<!-- TO BE REMOVED-->
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
Expand All @@ -268,7 +274,7 @@
<groupId>com.github.retrooper</groupId>
<artifactId>packetevents-spigot</artifactId>
<version>2.6.0</version>
<scope>provided</scope>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.tofaa.entitylib</groupId>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/pro4d/quickmc/QuickMC.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ public final class QuickMC {
@Getter private static JavaPlugin sourcePlugin;
@Getter private static PacketEventsAPI<?> packetEventsAPI;

public static boolean PAPI_LOADED;
public static boolean PAPI_LOADED, PACKET_EVENTS_LOADED;

//public static final AtomicBoolean REGISTERED = new AtomicBoolean(false);

public static void injectOnLoad(JavaPlugin plugin) {
// load the command api
CommandAPI.onLoad(new CommandAPIBukkitConfig(plugin).verboseOutput(false).silentLogs(true));

PACKET_EVENTS_LOADED = Bukkit.getPluginManager().getPlugin("packetevents") != null;
if(!PACKET_EVENTS_LOADED) throw new IllegalStateException("Can not find PacketEvents! This plugin is required");

// load PacketEvents
PacketEvents.setAPI(SpigotPacketEventsBuilder.build(plugin));

Expand All @@ -58,6 +61,7 @@ public static void init(JavaPlugin plugin) {
sourcePlugin = plugin;

//if(REGISTERED.getAndSet(true)) throw new IllegalStateException("QuickLib is already registered");
if(!PACKET_EVENTS_LOADED) throw new IllegalStateException("Can not find PacketEvents! This plugin is required");

wrappedVisuals = new ArrayList<>();
glowingEntities = new GlowingEntities(plugin);
Expand Down

0 comments on commit c017307

Please sign in to comment.