Overhaul build proccess (#89)

- Now only requires CoreProtect in /lib
- WorldEditListener and LibsDisguiseBridge updated
- Releaseparrots will now check if there are any parrots
- Fix some red lines in playerdata
This commit is contained in:
Telesphoreo 2018-07-24 17:06:58 -07:00 committed by Seth
parent 402a1e28b7
commit 22c6cf014c
12 changed files with 136 additions and 98 deletions

1
.gitignore vendored
View file

@ -1,5 +1,4 @@
# TFM excludes # TFM excludes
/lib
build.properties build.properties
git.properties git.properties

BIN
lib/CoreProtect_2.14.2.jar Normal file

Binary file not shown.

153
pom.xml
View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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/xsd/maven-4.0.0.xsd"> <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> <modelVersion>4.0.0</modelVersion>
<groupId>me.totalfreedom</groupId> <groupId>me.totalfreedom</groupId>
@ -16,7 +17,8 @@
<tfm.build.author>${buildAuthor}</tfm.build.author> <tfm.build.author>${buildAuthor}</tfm.build.author>
<tfm.build.head>${buildHead}</tfm.build.head> <tfm.build.head>${buildHead}</tfm.build.head>
<jar.finalName>${project.name}</jar.finalName> <jar.finalName>${project.name}</jar.finalName>
<maven.build.timestamp.format>dd/MM/yyyy hh:mm aa</maven.build.timestamp.format> <timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>MM/dd/yyyy HH:mm</maven.build.timestamp.format>
</properties> </properties>
<name>TotalFreedomMod</name> <name>TotalFreedomMod</name>
@ -36,9 +38,9 @@
</organization> </organization>
<scm> <scm>
<connection>scm:git:git@github.com:TotalFreedom/TotalFreedomMod.git</connection> <connection>scm:git:git@github.com:TFPatches/TotalFreedomMod.git</connection>
<developerConnection>scm:git:git@github.com:TotalFreedom/TotalFreedomMod.git</developerConnection> <developerConnection>scm:git:git@github.com:TFPatches/TotalFreedomMod.git</developerConnection>
<url>git@github.com:TotalFreedom/TotalFreedomMod.git</url> <url>git@github.com:TotalFreedom/TFPatches.git</url>
</scm> </scm>
<repositories> <repositories>
@ -50,48 +52,64 @@
<id>jitpack.io</id> <id>jitpack.io</id>
<url>https://jitpack.io</url> <url>https://jitpack.io</url>
</repository> </repository>
<repository> <repository>
<id>spigot-repo</id> <id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository> </repository>
<repository>
<id>elmakers-repo</id>
<url>http://maven.elmakers.com/repository/</url>
</repository>
<repository>
<id>sk89q-snapshots</id>
<url>http://maven.sk89q.com/artifactory/repo</url>
</repository>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
<repository>
<id>md_5-public</id>
<url>http://repo.md-5.net/content/groups/public/</url>
</repository>
<repository>
<id>dmulloy2-repo</id>
<url>http://repo.dmulloy2.net/nexus/repository/public/</url>
</repository>
<repository> <repository>
<id>sk89q-repo</id> <id>sk89q-repo</id>
<url>http://maven.sk89q.com/repo/</url> <url>http://maven.sk89q.com/repo/</url>
</repository> </repository>
<repository>
<id>sk89q-snapshots</id>
<url>http://maven.sk89q.com/artifactory/repo/</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.16.20</version> <version>1.18.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.13-pre7-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.Pravian</groupId> <groupId>com.github.Pravian</groupId>
<artifactId>Aero</artifactId> <artifactId>Aero</artifactId>
<version>2.1-SNAPSHOT</version> <version>5f82926</version>
<scope>system</scope> <scope>provided</scope>
<systemPath>${project.basedir}/lib/aero-2.1-SNAPSHOT.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
@ -101,6 +119,20 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.github.Telesphoreo</groupId>
<artifactId>TF-LibsDisguises</artifactId>
<version>c213295f95</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.Telesphoreo.TF-WorldEdit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>2e79570525</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>net.ess3</groupId> <groupId>net.ess3</groupId>
<artifactId>Essentials</artifactId> <artifactId>Essentials</artifactId>
@ -109,19 +141,16 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sk89q</groupId> <groupId>org.bukkit</groupId>
<artifactId>worldguard</artifactId> <artifactId>craftbukkit</artifactId>
<version>6.2</version> <version>1.13-pre7-R0.1-SNAPSHOT</version>
<scope>system</scope> <scope>provided</scope>
<systemPath>${project.basedir}/lib/worldguard-6.2.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.TotalFreedom.TF-WorldEdit</groupId> <groupId>net.dv8tion</groupId>
<artifactId>worldedit-bukkit</artifactId> <artifactId>JDA</artifactId>
<version>6.1.0-TF</version> <version>3.7.1_385</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/TF-WorldEdit.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
@ -133,29 +162,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>me.libraryaddict</groupId> <groupId>com.sk89q.worldguard</groupId>
<artifactId>LibsDisguises</artifactId> <artifactId>worldguard-legacy</artifactId>
<scope>system</scope> <version>6.2</version>
<version>9.4.0-SNAPSHOT</version> <scope>provided</scope>
<systemPath>${project.basedir}/lib/LibsDisguises.jar</systemPath>
</dependency> </dependency>
<dependency>
<groupId>org.spigot</groupId>
<artifactId>spigot</artifactId>
<version>1.13</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/spigot-1.13.jar</systemPath>
</dependency>
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>JDA-3.6.0_354-withDependencies</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/JDA-3.6.0_354-withDependencies.jar</systemPath>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -167,13 +178,12 @@
</resource> </resource>
</resources> </resources>
<plugins> <plugins>
<!-- Compiler --> <!-- Compiler -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version> <version>3.7.0</version>
<configuration> <configuration>
<outputFileName>TotalFreedomMod.jar</outputFileName> <outputFileName>TotalFreedomMod.jar</outputFileName>
<compilerVersion>1.8</compilerVersion> <compilerVersion>1.8</compilerVersion>
@ -192,11 +202,13 @@
<phase>initialize</phase> <phase>initialize</phase>
<configuration> <configuration>
<target> <target>
<propertyfile file="src/main/resources/build.properties" comment="Build information. Edit this to your liking."> <propertyfile file="src/main/resources/build.properties"
<entry key="buildAuthor" default="unknown" /> comment="Build information. Edit this to your liking.">
<entry key="buildNumber" default="0" /> <entry key="buildAuthor" default="unknown"/>
<entry key="buildCodeName" default="${tfm.build.codename}" /> <entry key="buildNumber" default="0"/>
<entry key="buildVersion" default="${project.version}" /> <entry key="buildCodeName" default="${tfm.build.codename}"/>
<entry key="buildVersion" default="${project.version}"/>
<entry key="buildDate" default="${timestamp}"/>
</propertyfile> </propertyfile>
</target> </target>
</configuration> </configuration>
@ -205,7 +217,6 @@
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
@ -276,7 +287,8 @@
<dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat> <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
<verbose>false</verbose> <verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile> <generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${basedir}/src/main/resources/git.properties</generateGitPropertiesFilename> <generateGitPropertiesFilename>${basedir}/src/main/resources/git.properties
</generateGitPropertiesFilename>
<format>properties</format> <format>properties</format>
<failOnNoGitDirectory>false</failOnNoGitDirectory> <failOnNoGitDirectory>false</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo> <failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
@ -311,7 +323,8 @@
<configuration> <configuration>
<buildNumberPropertyName>maven.buildnumber</buildNumberPropertyName> <buildNumberPropertyName>maven.buildnumber</buildNumberPropertyName>
<buildNumberPropertiesFileLocation>${basedir}/src/main/resources/build.properties</buildNumberPropertiesFileLocation> <buildNumberPropertiesFileLocation>${basedir}/src/main/resources/build.properties
</buildNumberPropertiesFileLocation>
<format>{0,number,#}</format> <format>{0,number,#}</format>
<items> <items>
<item>buildNumber</item> <item>buildNumber</item>
@ -343,4 +356,4 @@
</plugin> </plugin>
</plugins> </plugins>
</reporting> </reporting>
</project> </project>

View file

@ -268,4 +268,14 @@ public class Admin implements ConfigLoadable, ConfigSavable, Validatable
{ {
this.loginMessage = loginMessage; this.loginMessage = loginMessage;
} }
public String getDiscordID()
{
return this.discordID;
}
public void setDiscordID(String discordID)
{
this.discordID = discordID;
}
} }

View file

@ -1,13 +1,13 @@
package me.totalfreedom.totalfreedommod.bridge; package me.totalfreedom.totalfreedommod.bridge;
import me.libraryaddict.disguise.DisallowedDisguises;
import me.libraryaddict.disguise.DisguiseAPI; import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.LibsDisguises; import me.libraryaddict.disguise.LibsDisguises;
import me.totalfreedom.libsdisguise.DisallowedDisguises;
import me.totalfreedom.libsdisguise.TF_DisguiseAPI;
import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FLog; import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class LibsDisguisesBridge extends FreedomService public class LibsDisguisesBridge extends FreedomService
@ -111,11 +111,11 @@ public class LibsDisguisesBridge extends FreedomService
if (state) if (state)
{ {
DisguiseAPI.enableDisguises(); TF_DisguiseAPI.enableDisguises();
} }
else else
{ {
DisguiseAPI.disableDisguises(); TF_DisguiseAPI.disableDisguises();
} }
} }

View file

@ -2,16 +2,8 @@ package me.totalfreedom.totalfreedommod.bridge;
import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FUtil; import me.totalfreedom.totalfreedommod.util.FUtil;
// These imports are not in the latest releases of WorldEdit, and the new versions of WorldEdit do not build properly. This will need to be reverted once the new WorldEdit builds are building properly. import me.totalfreedom.worldedit.LimitChangedEvent;
// import me.totalfreedom.worldedit.SelectionChangedEvent;
//import me.totalfreedom.worldedit.LimitChangedEvent;
//import me.totalfreedom.worldedit.SelectionChangedEvent;
//
//The following two imports are a temporary measure as mentioned above.
//
import me.StevenLawson.worldedit.LimitChangedEvent;
import me.StevenLawson.worldedit.SelectionChangedEvent;
//
import net.pravian.aero.component.PluginListener; import net.pravian.aero.component.PluginListener;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View file

@ -1,11 +1,10 @@
package me.totalfreedom.totalfreedommod.command; package me.totalfreedom.totalfreedommod.command;
//import me.libraryaddict.disguise.DisallowedDisguises; import me.totalfreedom.libsdisguise.DisallowedDisguises;
import me.libraryaddict.disguise.DisallowedDisguises;
import me.totalfreedom.totalfreedommod.rank.Rank; import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil; import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -23,8 +22,8 @@ public class Command_disguisetoggle extends FreedomCommand
return true; return true;
} }
FUtil.adminAction(sender.getName(), (DisallowedDisguises.disabled ? "Enabling" : "Disabling") + " " + FUtil.adminAction(sender.getName(), (DisallowedDisguises.disabled ? "Enabling" : "Disabling")
"disguises.", false); + " disguises", false);
if (plugin.ldb.isDisguisesEnabled()) if (plugin.ldb.isDisguisesEnabled())
{ {

View file

@ -8,7 +8,7 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) @CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Release parrots from your shoulders.", usage = "/<command>", aliases="removeparrots") @CommandParameters(description = "Release parrots from your shoulders.", usage = "/<command>", aliases = "removeparrots")
public class Command_releaseparrots extends FreedomCommand public class Command_releaseparrots extends FreedomCommand
{ {
@ -17,6 +17,13 @@ public class Command_releaseparrots extends FreedomCommand
{ {
Entity leftShoulderEntity = playerSender.getShoulderEntityLeft(); Entity leftShoulderEntity = playerSender.getShoulderEntityLeft();
Entity rightShoulderEntity = playerSender.getShoulderEntityRight(); Entity rightShoulderEntity = playerSender.getShoulderEntityRight();
if (rightShoulderEntity == null && leftShoulderEntity == null)
{
msg("No parrots were detected on either of your shoulders.");
return true;
}
if (leftShoulderEntity != null && leftShoulderEntity.getType().equals(EntityType.PARROT)) if (leftShoulderEntity != null && leftShoulderEntity.getType().equals(EntityType.PARROT))
{ {
playerSender.setShoulderEntityLeft(null); playerSender.setShoulderEntityLeft(null);
@ -28,7 +35,6 @@ public class Command_releaseparrots extends FreedomCommand
playerSender.setShoulderEntityRight(null); playerSender.setShoulderEntityRight(null);
msg("Removed the parrot on your right shoulder."); msg("Removed the parrot on your right shoulder.");
} }
return true; return true;
} }
} }

View file

@ -1,7 +1,6 @@
package me.totalfreedom.totalfreedommod.command; package me.totalfreedom.totalfreedommod.command;
//import me.libraryaddict.disguise.DisallowedDisguises; import me.totalfreedom.libsdisguise.DisallowedDisguises;
import me.libraryaddict.disguise.DisallowedDisguises;
import me.totalfreedom.totalfreedommod.rank.Rank; import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil; import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command; import org.bukkit.command.Command;

View file

@ -27,11 +27,11 @@ public class Command_unlinkdiscord extends FreedomCommand
Admin admin = plugin.al.getAdmin(playerSender); Admin admin = plugin.al.getAdmin(playerSender);
if (admin.getDiscordID() == null) if (admin.getDiscordID() == null)
{ {
msg("Your minecraft account is not linked to a discord account.", ChatColor.RED); msg("Your Minecraft account is not linked to a discord account.", ChatColor.RED);
return true; return true;
} }
admin.setDiscordID(null); admin.setDiscordID(null);
msg("Your minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN); msg("Your Minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN);
return true; return true;
} }
else else
@ -39,12 +39,12 @@ public class Command_unlinkdiscord extends FreedomCommand
VPlayer data = plugin.pv.getVerificationPlayer(playerSender); VPlayer data = plugin.pv.getVerificationPlayer(playerSender);
if (data.getDiscordId() == null) if (data.getDiscordId() == null)
{ {
msg("Your minecraft account is not linked to a discord account.", ChatColor.RED); msg("Your Minecraft account is not linked to a discord account.", ChatColor.RED);
return true; return true;
} }
data.setDiscordId(null); data.setDiscordId(null);
data.setDiscordEnabled(false); data.setDiscordEnabled(false);
msg("Your minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN); msg("Your Minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN);
return true; return true;
} }
} }

View file

@ -131,6 +131,16 @@ public class FPlayer
return orbitStrength; return orbitStrength;
} }
public boolean isInvSee()
{
return invSee;
}
public void setInvSee(boolean toggle)
{
this.invSee = toggle;
}
public boolean isFuckOff() public boolean isFuckOff()
{ {
return fuckoffRadius > 0; return fuckoffRadius > 0;

View file

@ -88,4 +88,14 @@ public class VPlayer implements ConfigLoadable, ConfigSavable, Validatable
return name != null return name != null
&& !ips.isEmpty(); && !ips.isEmpty();
} }
public boolean getForumEnabled()
{
return this.forumEnabled;
}
public boolean getDiscordEnabled()
{
return this.discordEnabled;
}
} }