Skip to content

Commit

Permalink
Implemented ACF
Browse files Browse the repository at this point in the history
  • Loading branch information
RoinujNosde authored Oct 19, 2020
1 parent 69f75af commit 1b8a3fe
Show file tree
Hide file tree
Showing 183 changed files with 5,728 additions and 5,932 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/brintray-publish-1.8.yml

This file was deleted.

11 changes: 11 additions & 0 deletions co/aikar/commands/annotations.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<root>
<item name='co.aikar.commands.BukkitCommandCompletionContext org.bukkit.entity.Player getPlayer()'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='co.aikar.commands.BukkitCommandExecutionContext org.bukkit.entity.Player getPlayer()'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item name='co.aikar.commands.BukkitCommandIssuer org.bukkit.entity.Player getPlayer()'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
</root>
202 changes: 202 additions & 0 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
<artifactId>SimpleClans</artifactId>
<name>SimpleClans</name>
<version>2.14.0</version>
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>
<ciManagement>
<system>jenkins</system>
<url>http://104.236.246.108:8080</url>
</ciManagement>
<scm>
<connection>scm:git:git:@github.com:marcelo-mason/SimpleClans.git</connection>
<developerConnection>scm:git:git:@github.com:marcelo-mason/SimpleClans.git</developerConnection>
<tag>SimpleClans</tag>
<url>http://github.com/marcelo-mason/SimpleClans.git/tree/master/</url>
</scm>
<build>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>plugin.yml</include>
<include>config.yml</include>
<include>*.properties</include>
</includes>
</resource>
</resources>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<fork>true</fork>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats.bukkit</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.metrics</shadedPattern>
</relocation>
<relocation>
<pattern>io.papermc.lib</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.paperlib</shadedPattern>
</relocation>
<relocation>
<pattern>co.aikar.commands</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.acf</shadedPattern>
</relocation>
<relocation>
<pattern>co.aikar.locales</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.locales</shadedPattern>
</relocation>
<relocation>
<pattern>com.cryptomorin.xseries</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.xseries</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
<exclude>org.jetbrains:annotations</exclude>
</excludes>
</artifactSet>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>placeholderapi-repo</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>bstats-repo</id>
<url>https://repo.codemc.org/repository/maven-public</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>aikar</id>
<url>https://repo.aikar.co/content/groups/aikar/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion>
<artifactId>gson</artifactId>
<groupId>com.google.code.gson</groupId>
</exclusion>
<exclusion>
<artifactId>bungeecord-chat</artifactId>
<groupId>net.md-5</groupId>
</exclusion>
<exclusion>
<artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>org.bukkit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>16.0.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>bintray-roinujnosde-bukkit-plugins</id>
<name>roinujnosde-bukkit-plugins</name>
<url>https://api.bintray.com/maven/roinujnosde/bukkit-plugins/SimpleClans/;publish=1</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

2 changes: 1 addition & 1 deletion org/bukkit/configuration/annotations.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<root>
<item name='org.bukkit.configuration.MemorySection java.lang.String getString(java.lang.String, java.lang.String)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val val="&quot;_, _ -&gt; !null&quot;"/>
<val val="&quot;_, _, -&gt; !null&quot;"/>
</annotation>
</item>
</root>
36 changes: 35 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sacredlabyrinth.phaed.simpleclans</groupId>
<artifactId>SimpleClans</artifactId>
<version>2.13.1</version>
<version>2.14.0</version>
<name>SimpleClans</name>
<url>http://dev.bukkit.org/server-mods/simpleclans/</url>

Expand Down Expand Up @@ -37,6 +37,9 @@
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<fork>true</fork>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>

Expand Down Expand Up @@ -69,6 +72,18 @@
<pattern>io.papermc.lib</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.paperlib</shadedPattern>
</relocation>
<relocation>
<pattern>co.aikar.commands</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.acf</shadedPattern>
</relocation>
<relocation>
<pattern>co.aikar.locales</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.locales</shadedPattern>
</relocation>
<relocation>
<pattern>com.cryptomorin.xseries</pattern>
<shadedPattern>net.sacredlabyrinth.phaed.simpleclans.xseries</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
Expand Down Expand Up @@ -130,6 +145,21 @@
<version>1.0.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>co.aikar</groupId>
<artifactId>acf-paper</artifactId>
<version>0.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<version>7.2.1</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.12</version>
</dependency>
</dependencies>

<!-- Repositories -->
Expand All @@ -154,6 +184,10 @@
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>aikar</id>
<url>https://repo.aikar.co/content/groups/aikar/</url>
</repository>
</repositories>

<!-- GitHub/Jenkins -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Logger;

import static net.sacredlabyrinth.phaed.simpleclans.SimpleClans.lang;

/**
* @author phaed
*/
Expand Down Expand Up @@ -634,6 +637,10 @@ public static void sendMessage(CommandSender receiver, String msg) {
}
}

public static void sendMessageKey(@NotNull CommandSender receiver, @NotNull String key) {
sendMessage(receiver, lang(key, receiver));
}

/**
* Send blank lie
*
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/net/sacredlabyrinth/phaed/simpleclans/Clan.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.sacredlabyrinth.phaed.simpleclans;

import com.cryptomorin.xseries.XMaterial;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.sacredlabyrinth.phaed.simpleclans.events.*;
Expand All @@ -8,7 +9,6 @@
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.World;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -91,7 +91,7 @@ public int hashCode() {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof Clan)) {
return false;
}
Expand Down Expand Up @@ -1697,7 +1697,9 @@ public void setHomeLocation(@Nullable Location home) {
return null;
}

if (!(world.getBlockAt(homeX, homeY, homeZ).getType().equals(Material.AIR)) || !(world.getBlockAt(homeX, homeY + 1, homeZ).getType().equals(Material.AIR)) || homeY == 0) {
if (!(world.getBlockAt(homeX, homeY, homeZ).getType().equals(XMaterial.AIR.parseMaterial())) ||
!(world.getBlockAt(homeX, homeY + 1, homeZ).getType().equals(XMaterial.AIR.parseMaterial()))
|| homeY == 0) {
return new Location(world, homeX, world.getHighestBlockYAt(homeX, homeZ), homeZ);
} else {
return new Location(world, homeX, homeY, homeZ);
Expand Down
Loading

0 comments on commit 1b8a3fe

Please sign in to comment.