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
/lib
build.properties
git.properties

BIN
lib/CoreProtect_2.14.2.jar Normal file

Binary file not shown.

151
pom.xml
View File

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

View File

@ -268,4 +268,14 @@ public class Admin implements ConfigLoadable, ConfigSavable, Validatable
{
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;
import me.libraryaddict.disguise.DisallowedDisguises;
import me.libraryaddict.disguise.DisguiseAPI;
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.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
public class LibsDisguisesBridge extends FreedomService
@ -111,11 +111,11 @@ public class LibsDisguisesBridge extends FreedomService
if (state)
{
DisguiseAPI.enableDisguises();
TF_DisguiseAPI.enableDisguises();
}
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.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;
//
//The following two imports are a temporary measure as mentioned above.
//
import me.StevenLawson.worldedit.LimitChangedEvent;
import me.StevenLawson.worldedit.SelectionChangedEvent;
//
import me.totalfreedom.worldedit.LimitChangedEvent;
import me.totalfreedom.worldedit.SelectionChangedEvent;
import net.pravian.aero.component.PluginListener;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;

View File

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

View File

@ -8,7 +8,7 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
@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
{
@ -17,6 +17,13 @@ public class Command_releaseparrots extends FreedomCommand
{
Entity leftShoulderEntity = playerSender.getShoulderEntityLeft();
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))
{
playerSender.setShoulderEntityLeft(null);
@ -28,7 +35,6 @@ public class Command_releaseparrots extends FreedomCommand
playerSender.setShoulderEntityRight(null);
msg("Removed the parrot on your right shoulder.");
}
return true;
}
}

View File

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

View File

@ -27,11 +27,11 @@ public class Command_unlinkdiscord extends FreedomCommand
Admin admin = plugin.al.getAdmin(playerSender);
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;
}
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;
}
else
@ -39,12 +39,12 @@ public class Command_unlinkdiscord extends FreedomCommand
VPlayer data = plugin.pv.getVerificationPlayer(playerSender);
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;
}
data.setDiscordId(null);
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;
}
}

View File

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

View File

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