This commit is contained in:
ASangarin 2020-09-12 20:41:48 +02:00
commit a56375a556
5 changed files with 174 additions and 161 deletions

View File

@ -1 +1,4 @@
![eclipse_SEyunr6cEZ](/uploads/4537bd2ada7d70653c7e26a0efc88565/eclipse_SEyunr6cEZ.png)
Private repository for MMOCore.
Issues: https://git.lumine.io/mythiccraft/mmocore/-/issues
Wiki: https://git.lumine.io/mythiccraft/mmocore/-/wikis/home

Binary file not shown.

Binary file not shown.

324
pom.xml
View File

@ -1,166 +1,172 @@
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.Indyuce</groupId>
<artifactId>MMOCore</artifactId>
<version>1.4.5</version>
<name>MMOCore</name>
<description>Offer your players a brand new RPG experience.</description>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.Indyuce</groupId>
<artifactId>MMOCore</artifactId>
<version>1.4.5</version>
<name>MMOCore</name>
<description>Offer your players a brand new RPG experience.</description>
<properties>
<build.number>SNAPSHOT</build.number>
<downloadSources>false</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<properties>
<build.number>SNAPSHOT</build.number>
<downloadSources>false</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Lumine Releases</name>
<url>http://mvn.lumine.io/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Lumine Snapshots</name>
<url>http://mvn.lumine.io/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Lumine Releases</name>
<url>http://mvn.lumine.io/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Lumine Snapshots</name>
<url>http://mvn.lumine.io/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build>
<finalName>${project.name}-${project.version}</finalName>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources/</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<junitArtifactName>junit:junit</junitArtifactName>
<encoding>UTF-8</encoding>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<argLine>-ea -Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sk89q-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
</repositories>
<dependencies>
<build>
<finalName>${project.name}-${project.version}</finalName>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources/</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<junitArtifactName>junit:junit</junitArtifactName>
<encoding>UTF-8</encoding>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<argLine>-ea -Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sk89q-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.Indyuce</groupId>
<artifactId>mmoitems</artifactId>
<version>5.1.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MMOItems.jar</systemPath>
</dependency>
<dependency>
<groupId>net.Indyuce</groupId>
<artifactId>MMOLib</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MMOLib.jar</systemPath>
</dependency>
<!-- MMOs -->
<dependency>
<groupId>net.Indyuce</groupId>
<artifactId>mmoitems</artifactId>
<version>6.1.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MMOItems.jar</systemPath>
</dependency>
<dependency>
<groupId>net.Indyuce</groupId>
<artifactId>MMOLib</artifactId>
<version>1.3</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MMOLib.jar</systemPath>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.14.4</version>
<scope>system</scope>
<systemPath>${basedir}/lib/spigot.jar</systemPath>
</dependency>
<dependency>
<groupId>com.bekvon.bukkit</groupId>
<artifactId>Residence</artifactId>
<version>4.8.7.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Residence.jar</systemPath>
</dependency>
<dependency>
<groupId>com.Zrips</groupId>
<artifactId>CMI</artifactId>
<version>8.6.5.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/CMI.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sainttx.holograms</groupId>
<artifactId>holograms</artifactId>
<version>2.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Holograms.jar</systemPath>
</dependency>
<dependency>
<groupId>com.gmail.filoghost</groupId>
<artifactId>HolographicDisplays</artifactId>
<version>6.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/HolographicDisplays.jar</systemPath>
</dependency>
<dependency>
<groupId>io.lumine.xikage</groupId>
<artifactId>MythicMobs</artifactId>
<version>4.8.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MythicMobs.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.25-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Citizens.jar</systemPath>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.41</version>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.7</version>
<scope>system</scope>
<systemPath>${basedir}/lib/PlaceholderAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>19.0.0</version>
</dependency>
</dependencies>
<!-- Minecraft -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12-R1-1.16-R2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/spigot.jar</systemPath>
</dependency>
<!-- APIs -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>19.0.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.41</version>
</dependency>
<!-- Other Plugins -->
<dependency>
<groupId>com.bekvon.bukkit</groupId>
<artifactId>Residence</artifactId>
<version>4.8.7.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Residence.jar</systemPath>
</dependency>
<dependency>
<groupId>com.Zrips</groupId>
<artifactId>CMI</artifactId>
<version>8.6.5.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/CMI.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sainttx.holograms</groupId>
<artifactId>holograms</artifactId>
<version>2.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Holograms.jar</systemPath>
</dependency>
<dependency>
<groupId>com.gmail.filoghost</groupId>
<artifactId>HolographicDisplays</artifactId>
<version>6.9.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/HolographicDisplays.jar</systemPath>
</dependency>
<dependency>
<groupId>io.lumine.xikage</groupId>
<artifactId>MythicMobs</artifactId>
<version>4.8.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/MythicMobs.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.25-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/Citizens.jar</systemPath>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.7</version>
<scope>system</scope>
<systemPath>${basedir}/lib/PlaceholderAPI.jar</systemPath>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,7 @@
package net.Indyuce.mmocore.listener;
import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -47,7 +48,10 @@ public class PartyListener implements Listener {
*/
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void b(PlayerAttackEvent event) {
if (event.getEntity() instanceof Player) {
LivingEntity entity = event.getEntity();
if (entity instanceof Player) {
if (entity.hasMetadata("NPC"))
return;
PlayerData targetData = PlayerData.get((Player) event.getEntity());
if (targetData.hasParty() && targetData.getParty().getMembers().has(event.getData().getMMOCore()))
event.setCancelled(true);