diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..5b8d1fb3393226b5f2fd61b97c704d2d22bbb9fb --- /dev/null +++ b/dependency-reduced-pom.xml @@ -0,0 +1,170 @@ +<?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>io.github.packserver.RegPlug</groupId> + <artifactId>RegPlug</artifactId> + <name>RegPlug</name> + <version>0.0.1-SNAPSHOT</version> + <description>A registration plugin.</description> + <build> + <sourceDirectory>src</sourceDirectory> + <resources> + <resource> + <targetPath>.</targetPath> + <filtering>true</filtering> + <directory>${basedir}/resources</directory> + <includes> + <include>plugin.yml</include> + </includes> + </resource> + <resource> + <targetPath>./httdocs</targetPath> + <filtering>true</filtering> + <directory>${basedir}/httdocs</directory> + <includes> + <include>*</include> + </includes> + </resource> + </resources> + <finalName>RegPlug</finalName> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <phase>install</phase> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + <configuration> + <tasks> + <copy /> + </tasks> + </configuration> + </plugin> + <plugin> + <artifactId>maven-shade-plugin</artifactId> + <version>2.2</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + <configuration> + <promoteTransitiveDependencies>false</promoteTransitiveDependencies> + <minimizeJar>true</minimizeJar> + <filters> + <filter> + <artifact>*:*</artifact> + <excludes> + <exclude>META-INF/*.SF</exclude> + <exclude>META-INF/*.DSA</exclude> + <exclude>META-INF/*.RSA</exclude> + <exclude>about.html</exclude> + </excludes> + </filter> + </filters> + </configuration> + </plugin> + </plugins> + </build> + <repositories> + <repository> + <id>spigot-repo</id> + <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> + </repository> + <repository> + <id>jWebSocket-Repo</id> + <name>jWebSocket Repository</name> + <url>http://mvn.jwebsocket.org/</url> + </repository> + </repositories> + <dependencies> + <dependency> + <groupId>org.spigotmc</groupId> + <artifactId>spigot-api</artifactId> + <version>1.8.8-R0.1-SNAPSHOT</version> + <scope>provided</scope> + <exclusions> + <exclusion> + <artifactId>commons-lang</artifactId> + <groupId>commons-lang</groupId> + </exclusion> + <exclusion> + <artifactId>json-simple</artifactId> + <groupId>com.googlecode.json-simple</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>ebean</artifactId> + <groupId>org.avaje</groupId> + </exclusion> + <exclusion> + <artifactId>snakeyaml</artifactId> + <groupId>org.yaml</groupId> + </exclusion> + <exclusion> + <artifactId>bungeecord-chat</artifactId> + <groupId>net.md-5</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.bukkit</groupId> + <artifactId>bukkit</artifactId> + <version>1.8.8-R0.1-SNAPSHOT</version> + <scope>provided</scope> + <exclusions> + <exclusion> + <artifactId>commons-lang</artifactId> + <groupId>commons-lang</groupId> + </exclusion> + <exclusion> + <artifactId>json-simple</artifactId> + <groupId>com.googlecode.json-simple</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>ebean</artifactId> + <groupId>org.avaje</groupId> + </exclusion> + <exclusion> + <artifactId>snakeyaml</artifactId> + <groupId>org.yaml</groupId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <properties> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> +</project> + diff --git a/pom.xml b/pom.xml index aaa5613001728c2fcbf143e3298f9529f4fea199..0ac1ec8a0259c00baf2085454dd581c1baad7577 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ </includes> </resource> <resource> - <targetPath>.</targetPath> + <targetPath>./httdocs</targetPath> <filtering>true</filtering> <directory>${basedir}/httdocs</directory> <includes> @@ -57,6 +57,34 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>2.2</version> + <configuration> + <promoteTransitiveDependencies>false</promoteTransitiveDependencies> + <minimizeJar>true</minimizeJar> + <filters> + <filter> + <artifact>*:*</artifact> + <excludes> + <exclude>META-INF/*.SF</exclude> + <exclude>META-INF/*.DSA</exclude> + <exclude>META-INF/*.RSA</exclude> + <exclude>about.html</exclude> + </excludes> + </filter> + </filters> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </build> <repositories> diff --git a/src/io/github/packserver/RegPlug/Main.java b/src/io/github/packserver/RegPlug/Main.java index 63238d9cc17c6f9d44827887c082c0f663793cb8..d28836128962ce5464d8afe6941ec554985174f9 100644 --- a/src/io/github/packserver/RegPlug/Main.java +++ b/src/io/github/packserver/RegPlug/Main.java @@ -31,7 +31,7 @@ public class Main extends JavaPlugin { // Fired when plugin is disabled @Override public void onDisable() { - + } // Fired when plugin is first enabled @@ -46,8 +46,9 @@ public class Main extends JavaPlugin { } @EventHandler - public void onJoin(PlayerJoinEvent e) { - Player p = e.getPlayer(); + public void onPlayerJoin(PlayerJoinEvent event) { + // Get player object from join event + Player p = event.getPlayer(); p.sendMessage(ChatColor.WHITE + "" + ChatColor.BOLD + "▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮"); p.sendMessage(ChatColor.AQUA + ""); p.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "Want to here LIVE music, announcers, and sound effects?"); @@ -58,6 +59,5 @@ public class Main extends JavaPlugin { p.sendMessage(ChatColor.DARK_RED + "" + ChatColor.BOLD + "Simply leave your browser window open in the background, turn up your speakers, and we'll do the rest!"); p.sendMessage(ChatColor.AQUA + ""); p.sendMessage(ChatColor.WHITE + "" + ChatColor.BOLD + "▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮■▮"); - } } diff --git a/src/io/github/packserver/RegPlug/WebServer.java b/src/io/github/packserver/RegPlug/WebServer.java index 2a739bd2f7c3be48561b2b44fbb9b134ef9693cb..7728c19189c4b3f990d234981406ba14806f6ea5 100644 --- a/src/io/github/packserver/RegPlug/WebServer.java +++ b/src/io/github/packserver/RegPlug/WebServer.java @@ -21,7 +21,7 @@ import org.eclipse.jetty.server.handler.ResourceHandler; public class WebServer { public static void runServer() { - Server server = new Server(80); + Server server = new Server(8081); ResourceHandler resource_handler = new ResourceHandler(); resource_handler.setDirectoriesListed(true);