Skip to content

Commit

Permalink
API update with maven support
Browse files Browse the repository at this point in the history
  • Loading branch information
Zrips committed Jan 31, 2023
1 parent 83f49fa commit 828daaf
Show file tree
Hide file tree
Showing 356 changed files with 16,861 additions and 11,765 deletions.
23 changes: 17 additions & 6 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="lib" path="D:/MC/lib/spigot-1.16.5.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_251"/>
<classpathentry kind="lib" path="D:/MC/lib/Vault-1.7.3.jar"/>
<classpathentry kind="lib" path="D:/MC/lib/CMILib1.0.3.7.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/bin/
/target/
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
105 changes: 105 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>CMI-API</groupId>
<artifactId>CMI-API</artifactId>
<version>9.3.1.2</version>

<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
<exclusion>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>1.5.21</version>
<scope>provided</scope>
</dependency>
<!-- Vault -->
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
</exclusion>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- CMILib -->
<dependency>
<groupId>net.Zrips</groupId>
<artifactId>CMILib</artifactId>
<version>latest</version>
<scope>system</scope>
<systemPath>${basedir}/libs/CMILib1.2.4.1.jar</systemPath>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<!-- papermc -->
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>minecraft-repo</id>
<url>https://libraries.minecraft.net/</url>
</repository>
</repositories>
<!-- Builds Plugin -->
<build>
<defaultGoal>clean package</defaultGoal>
<finalName>CMI-API${project.version}</finalName>
<sourceDirectory>${basedir}/src</sourceDirectory>
<plugins>
<!-- Make a Jar -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
</plugin>
</plugins>
</build>
</project>
49 changes: 48 additions & 1 deletion src/com/Zrips/CMI/AllListeners/ArmorChangeListener.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
package com.Zrips.CMI.AllListeners;

import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.event.player.PlayerQuitEvent;

import com.Zrips.CMI.CMI;

Expand All @@ -9,6 +22,40 @@ public class ArmorChangeListener implements Listener {
private CMI plugin;

public ArmorChangeListener(CMI plugin) {
this.plugin = plugin;
this.plugin = plugin;
}

@EventHandler(priority = EventPriority.HIGH)
public void InventoryDragEvent(InventoryDragEvent event) {
}

@EventHandler(priority = EventPriority.HIGH)
public void onInventoryClick(InventoryClickEvent event) {
}

public static Set<UUID> checked = new HashSet<UUID>();

@EventHandler
public void playerInteractEvent(PlayerPickupItemEvent event) {
checked.remove(event.getPlayer().getUniqueId());
}

@EventHandler
public void playerInteractEvent(PlayerItemHeldEvent event) {
checked.remove(event.getPlayer().getUniqueId());
}

@EventHandler
public void playerInteractEvent(PlayerQuitEvent event) {
checked.remove(event.getPlayer().getUniqueId());
}

@EventHandler(priority = EventPriority.HIGH)
public void playerInteractEvent(PlayerInteractEvent event) {

}

@EventHandler(priority = EventPriority.HIGH)
public void dispenserFireEvent(BlockDispenseEvent event) {
}
}
7 changes: 7 additions & 0 deletions src/com/Zrips/CMI/AllListeners/ArmorChangeListener1_9.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.Zrips.CMI.AllListeners;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;

import com.Zrips.CMI.CMI;

Expand All @@ -11,4 +13,9 @@ public class ArmorChangeListener1_9 implements Listener {
public ArmorChangeListener1_9(CMI plugin) {
this.plugin = plugin;
}

@EventHandler
public void playerInteractEvent(PlayerSwapHandItemsEvent event) {
ArmorChangeListener.checked.remove(event.getPlayer().getUniqueId());
}
}
27 changes: 26 additions & 1 deletion src/com/Zrips/CMI/AllListeners/BossBarCompassListener.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
package com.Zrips.CMI.AllListeners;

import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;

import com.Zrips.CMI.CMI;

public class BossBarCompassListener implements Listener {
private CMI plugin;

public BossBarCompassListener(CMI plugin) {
this.plugin = plugin;
this.plugin = plugin;
}

ConcurrentHashMap<UUID, Long> compassCheck = new ConcurrentHashMap<UUID, Long>();

@EventHandler(priority = EventPriority.MONITOR)
public void PlayerItemHeldEvent(final PlayerJoinEvent event) {
compassCheck.put(event.getPlayer().getUniqueId(), System.currentTimeMillis() + 1000L);
}

@EventHandler(priority = EventPriority.MONITOR)
public void PlayerItemHeldEvent(final PlayerItemHeldEvent event) {

}

@EventHandler(priority = EventPriority.MONITOR)
public void PlayerMoveEvent(final PlayerMoveEvent event) {

}

}
37 changes: 36 additions & 1 deletion src/com/Zrips/CMI/AllListeners/CustomMessagesListener.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
package com.Zrips.CMI.AllListeners;

import java.util.regex.Matcher;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;

import com.Zrips.CMI.CMI;
import com.Zrips.CMI.Config;
import com.Zrips.CMI.Containers.Snd;
import com.Zrips.CMI.Locale.CMILC;
import com.Zrips.CMI.Modules.BungeeCord.BungeePlayer;
import com.Zrips.CMI.Modules.InteractiveCommand.CMIInteractiveCommand;
import com.Zrips.CMI.Modules.Permissions.PermissionsManager.CMIPerm;

import net.Zrips.CMILib.Container.CMILocation;
import net.Zrips.CMILib.Locale.LC;
import net.Zrips.CMILib.Logs.CMIDebug;
import net.Zrips.CMILib.Messages.CMIMultiMessage;

public class CustomMessagesListener implements Listener {
CMI plugin;

public CustomMessagesListener(CMI plugin) {
this.plugin = plugin;
this.plugin = plugin;
}

@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onQuit(PlayerQuitEvent event) {
}

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onJoinMulti(PlayerQuitEvent event) {

}

@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onJoin(PlayerJoinEvent event) {
}

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onJoinMulti(PlayerJoinEvent event) {

}
}
12 changes: 12 additions & 0 deletions src/com/Zrips/CMI/AllListeners/FirstJoinListener.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
package com.Zrips.CMI.AllListeners;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

import com.Zrips.CMI.CMI;
import com.Zrips.CMI.Containers.Snd;
import com.Zrips.CMI.Locale.CMILC;

import net.Zrips.CMILib.Locale.LC;

public class FirstJoinListener implements Listener {
CMI plugin;
Expand All @@ -11,4 +20,7 @@ public FirstJoinListener(CMI plugin) {
this.plugin = plugin;
}

@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerFirstLogin(PlayerJoinEvent event) {
}
}
Loading

0 comments on commit 828daaf

Please sign in to comment.