Clean the project

This commit is contained in:
Gabriele C 2016-01-20 12:40:04 +01:00
parent adfd0e6674
commit 51d2e37853
17 changed files with 331 additions and 87 deletions

130
.gitignore vendored
View File

@ -1,10 +1,126 @@
### Others ###
*.bat
*.cmd
*.sh
*.prefs
### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
### Java ###
*.class
/target/classes
/target/PlotSquared-Null.jar
/target/PlotSquared-Uber.jar
/target/maven-archiver
*.project
*.classpath
/target/
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# .idea/shelf
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Eclipse ###
*.pydevproject
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
# Eclipse Core
.project
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Java annotation processor (APT)
.factorypath
# PDT-specific
.buildpath
# sbteclipse plugin
.target
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans

259
pom.xml
View File

@ -1,45 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>com.intellectualcrafters</groupId>
<artifactId>plotsquared</artifactId>
<version>3.2.27-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PlotSquared</name>
<description>Reinventing the plotworld!</description>
<url>http://www.spigotmc.org/resources/plotsquared.1177/</url>
<organization>
<name>IntellectualSites</name>
<url>https://github.com/IntellectualSites</url>
</organization>
<scm>
<connection>scm:git:https://github.com/IntellectualSites/PlotSquared.git</connection>
<developerConnection>scm:git:git@github.com:IntellectualSites/PlotSquared.git</developerConnection>
<url>https://github.com/IntellectualSites/PlotSquared</url>
</scm>
<!-- Not Official -->
<ciManagement>
<system>jenkins</system>
<url>http://ci.xephi.fr/job/PlotSquared/</url>
</ciManagement>
<licenses>
<license>
<name>The GNU General Public Licence version 3 (GPLv3)</name>
<url>http://www.gnu.org/licenses/gpl-3.0.html</url>
</license>
</licenses>
<prerequisites>
<maven>3.3.3</maven>
</prerequisites>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Change Compiler Version (JDK) HERE! -->
<javaVersion>1.7</javaVersion>
<!-- Change Bukkit Version HERE! -->
<bukkitVersion>1.8.8-R0.1-SNAPSHOT</bukkitVersion>
<spongeVersion>3.1.0-SNAPSHOT</spongeVersion>
</properties>
<artifactId>PlotSquared</artifactId>
<version>3.2.26</version>
<name>PlotSquared</name>
<packaging>jar</packaging>
<build>
<finalName>PlotSquared-Uber</finalName>
<finalName>${project.name}-Universal-${project.version}</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<excludes>
<exclude>skyblock.template</exclude>
<exclude>town.template</exclude>
</excludes>
<includes>
<include>plugin.yml</include>
</includes>
<directory>${basedir}/src/main/resources/</directory>
</resource>
<resource>
<filtering>false</filtering>
<includes>
<include>skyblock.template</include>
<include>town.template</include>
<include>s_chinese.yml</include>
<include>s_chinese_unescaped.yml</include>
<include>german.yml</include>
<include>italian.yml</include>
</includes>
<excludes>
<exclude>plugin.yml</exclude>
</excludes>
<directory>${basedir}/src/main/resources/</directory>
</resource>
</resources>
<plugins>
<!-- TODO: split the project into more modules -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<version>2.6</version>
<executions>
<execution>
<id>bukkit</id>
@ -48,12 +85,13 @@
</goals>
<phase>package</phase>
<configuration>
<finalName>PlotSquared-Bukkit</finalName>
<finalName>${project.name}-Bukkit-${project.version}</finalName>
<excludes>
<exclude>**/com/plotsquared/sponge/**</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>sponge</id>
<goals>
@ -61,13 +99,15 @@
</goals>
<phase>package</phase>
<configuration>
<finalName>PlotSquared-Sponge</finalName>
<finalName>${project.name}-Sponge-${project.version}</finalName>
<excludes>
<exclude>**/com/plotsquared/bukkit/**</exclude>
<exclude>**/com/intellectualcrafters/plot/api/*</exclude>
</excludes>
</configuration>
</execution>
<!-- Invalid
<execution>
<id>api</id>
<goals>
@ -75,7 +115,7 @@
</goals>
<phase>package</phase>
<configuration>
<finalName>PlotSquared-Null</finalName>
<finalName>${project.name}-API-${project.version}</finalName>
<excludes>
<exclude>**/com/plotsquared/bukkit/**</exclude>
<exclude>**/com/plotsquared/sponge/**</exclude>
@ -83,16 +123,45 @@
</excludes>
</configuration>
</execution>
-->
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<target>${javaVersion}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>false</minimizeJar>
<relocations>
<relocation>
<pattern>com.google.gson</pattern>
<shadedPattern>com.plotsquared.libs.gson</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Useless ATM
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@ -101,37 +170,18 @@
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
-->
</plugins>
</build>
<repositories>
<repository>
<id>techcable-repo</id>
<!-- Just leave the repositories section alone or bukkit won't work -->
<url>http://repo.techcable.net/content/groups/public/</url>
</repository>
<repository>
<id>empcraft-repo</id>
<url>http://empcraft.com/maven2</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>http://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>confuser-repo</id>
<url>http://ci.frostcast.net/plugin/repository/everything</url>
</repository>
<repository>
<id>sk80q</id>
<url>http://maven.sk89q.com/artifactory/repo/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
</repository>
<repository>
<id>sponge-maven-repo</id>
<name>Sponge maven repo</name>
<url>http://repo.spongepowered.org/maven</url>
<releases>
<enabled>true</enabled>
@ -140,50 +190,131 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>sk89q</id>
<url>http://maven.sk89q.com/repo/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
</repository>
</repositories>
<dependencies>
<!-- Bukkit API, http://www.spigotmc.org/ or http://bukkit.org/ -->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>${bukkitVersion}</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
<exclusion>
<artifactId>gson</artifactId>
<groupId>com.google.code.gson</groupId>
</exclusion>
<exclusion>
<artifactId>persistence-api</artifactId>
<groupId>javax.persistence</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Sponge API -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>${spongeVersion}</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>spongeapi</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8.3-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId>
<version>6.0.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>truezip</artifactId>
<groupId>de.schlichtherle</groupId>
</exclusion>
<exclusion>
<artifactId>js</artifactId>
<groupId>rhino</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.2</version>
<version>3.6</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<!-- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
-->
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.5</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- GSON (required to provide 1.7.10 and below compatibility) -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
<version>2.5</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</project>
</project>

View File

@ -30,6 +30,7 @@ public class YamlConfiguration extends FileConfiguration {
private final Yaml yaml = new Yaml(new YamlConstructor(), yamlRepresenter, yamlOptions);
@Override
@SuppressWarnings("deprecation")
public String saveToString() {
yamlOptions.setIndent(options().indent());
yamlOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);

View File

@ -13,7 +13,6 @@ import java.util.regex.Pattern;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.StringMan;
import com.plotsquared.general.commands.Command;

View File

@ -27,7 +27,7 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
* SubCommand class
*
*/
@SuppressWarnings({ "deprecation", "unused" })
@SuppressWarnings({ "deprecation" })
public abstract class SubCommand extends com.plotsquared.general.commands.Command<PlotPlayer> {
/**

View File

@ -30,7 +30,6 @@ import com.intellectualcrafters.plot.util.StringComparison;
* Main Configuration Utility
*
*/
@SuppressWarnings("unused")
public class Configuration {
public static final SettingValue<String> STRING = new SettingValue<String>("STRING") {

View File

@ -45,7 +45,6 @@ import com.intellectualcrafters.plot.util.Permissions;
*/
@SuppressWarnings("unused")
public class FlagManager {
private final static HashSet<String> reserved = new HashSet<>();

View File

@ -95,7 +95,6 @@ public class ConsoleColors {
win = lin;
}
@SuppressWarnings("unused")
public String getWin() {
return win;
}

View File

@ -186,7 +186,8 @@ public abstract class EventUtil {
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER.s(), false)) {
return true;
}
return !(!false || MainUtil.sendMessage(pp, C.FLAG_TUTORIAL_USAGE, C.FLAG_USE.s() + "/" + C.FLAG_DEVICE_INTERACT.s()));
// TODO: fix the commented dead code
return true; //!(!false || MainUtil.sendMessage(pp, C.FLAG_TUTORIAL_USAGE, C.FLAG_USE.s() + "/" + C.FLAG_DEVICE_INTERACT.s()));
}
return true;
}

View File

@ -28,7 +28,6 @@ import java.util.Collections;
* String comparison library
*
*/
@SuppressWarnings("unused")
public class StringComparison<T> {
private T bestMatch;

View File

@ -5,7 +5,6 @@ import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;

View File

@ -29,7 +29,6 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map.Entry;
@ -210,9 +209,13 @@ public class LikePlotMeConverter {
final String actualWorldName = getWorld(world);
final String plotMeWorldName = world.toLowerCase();
Integer pathwidth = PLOTME_DG_YML.getInt("worlds." + plotMeWorldName + ".PathWidth"); //
/*
* TODO: dead code
*
if (pathwidth == null) {
pathwidth = 7;
}
*/
PS.get().config.set("worlds." + world + ".road.width", pathwidth);
Integer pathheight = PLOTME_DG_YML.getInt("worlds." + plotMeWorldName + ".RoadHeight"); //

View File

@ -1,8 +1,6 @@
package com.plotsquared.bukkit.util;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import org.bukkit.Bukkit;
@ -15,11 +13,8 @@ import org.bukkit.generator.ChunkGenerator.BiomeGrid;
import org.bukkit.material.Directional;
import org.bukkit.material.MaterialData;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.generator.HybridUtils;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotAnalysis;
import com.intellectualcrafters.plot.object.PlotBlock;
import com.intellectualcrafters.plot.object.RegionWrapper;

View File

@ -10,7 +10,6 @@ import java.util.concurrent.ConcurrentHashMap;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.util.Permissions;
@SuppressWarnings("unused")
public class CommandManager<T extends CommandCaller> {
final public ConcurrentHashMap<String, Command<T>> commands;

View File

@ -91,7 +91,10 @@ public class StateWrapper {
}
return tags;
}
/*
* TODO: Move this into the spongee module!
*
public Map<String, Tag> serializeItem(final org.spongepowered.api.item.inventory.ItemStack item) {
final Map<String, Tag> data = new HashMap<String, Tag>();
@ -99,6 +102,7 @@ public class StateWrapper {
return data;
}
*/
public Map<String, Tag> serializeItem(final ItemStack item) {
final Map<String, Tag> data = new HashMap<String, Tag>();

Binary file not shown.

Binary file not shown.