-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from DmitryRendov/master
Plugin refactoring to Maven, remove legacy stuff
- Loading branch information
Showing
54 changed files
with
863 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
/.project | ||
/build.xml | ||
|
||
/.classpath | ||
/.classpath | ||
/target | ||
/.idea |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<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>ru.Den_Abr.ChatGuard</groupId> | ||
<artifactId>ChatGuardPlugin</artifactId> | ||
<version>7.6.0</version> | ||
<packaging>jar</packaging> | ||
<name>ChatGuardPlugin</name> | ||
<description>Guard for your chat.</description> | ||
<url>https://github.com/DenAbr/ChatGuard</url> | ||
|
||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>bukkit</artifactId> | ||
<version>1.13-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>fr.xephi</groupId> | ||
<artifactId>authme</artifactId> | ||
<version>5.4.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>fr.neatmonster</groupId> | ||
<artifactId>nocheatplus</artifactId> | ||
<version>3.16.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.comphenix.protocol</groupId> | ||
<artifactId>ProtocolLib</artifactId> | ||
<version>4.2.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.comphenix.protocol</groupId> | ||
<artifactId>ProtocolLib-API</artifactId> | ||
<version>4.2.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<!-- Spigot --> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>spigot</id> | ||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url> | ||
</repository> | ||
<repository> | ||
<id>codemc-repo</id> | ||
<url>http://repo.codemc.org/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>md_5-snapshots</id> | ||
<url>https://repo.md-5.net/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>md_5-releases</id> | ||
<url>https://repo.md-5.net/content/repositories/releases/</url> | ||
</repository> | ||
<repository> | ||
<id>dmulloy2-repo</id> | ||
<url>http://repo.dmulloy2.net/nexus/repository/public/</url> | ||
</repository> | ||
<repository> | ||
<id>drtshock-repo</id> | ||
<url>http://ci.drtshock.net/plugin/repository/everything/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<defaultGoal>clean package</defaultGoal> | ||
<finalName>${project.name}${project.version}</finalName> | ||
<sourceDirectory>${basedir}/src</sourceDirectory> | ||
<resources> | ||
<resource> | ||
<filtering>true</filtering> | ||
<directory>${project.basedir}</directory> | ||
<includes> | ||
<include>plugin.yml</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<filtering>true</filtering> | ||
<directory>src/main/resources/</directory> | ||
<includes> | ||
<include>*.yml</include> | ||
<include>*.txt</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.2</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
src/main/java/ru/Den_Abr/ChatGuard/Integration/AuthMe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package ru.Den_Abr.ChatGuard.Integration; | ||
|
||
import org.bukkit.Bukkit; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.plugin.Plugin; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
import ru.Den_Abr.ChatGuard.Utils.Utils; | ||
import fr.xephi.authme.api.v3.AuthMeApi; | ||
|
||
public class AuthMe extends AbstractIntegration { | ||
private JavaPlugin plugin; | ||
|
||
@Override | ||
public boolean skipPlayer(Player p) { | ||
return !AuthMeApi.getInstance().isAuthenticated(p); | ||
} | ||
|
||
@Override | ||
public JavaPlugin getPlugin() { | ||
return plugin; | ||
} | ||
|
||
@Override | ||
public boolean load() { | ||
Plugin pl = Bukkit.getPluginManager().getPlugin("AuthMe"); | ||
if (null == pl) | ||
return false; | ||
if (Utils.isInt(pl.getDescription().getVersion().split("\\.")[0]) | ||
&& Integer | ||
.parseInt(pl.getDescription().getVersion().split("\\.")[0]) >= 5) { | ||
plugin = (JavaPlugin) pl; | ||
} | ||
return plugin != null && pl.isEnabled(); | ||
} | ||
|
||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: ChatGuard | ||
main: ru.Den_Abr.ChatGuard.ChatGuardPlugin | ||
version: 7.6.0 | ||
author: Den_Abr | ||
description: Guard for your chat | ||
softdepend: [ProtocolLib, AuthMe, NoCheatPlus] | ||
commands: | ||
cg: | ||
description: ChatGuard commands. | ||
usage: /<command> | ||
aliases: [chatguard] |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.