TotalFreedomMod 7.0.0
This commit is contained in:
parent
1906933ec8
commit
12cf195e55
|
@ -106,7 +106,7 @@ dependencies {
|
|||
implementation('org.junit.jupiter:junit-jupiter:5.8.1')
|
||||
implementation('org.projectlombok:lombok:1.18.20')
|
||||
compileOnly('org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT')
|
||||
compileOnly('me.totalfreedom:bukkittelnet:4.6')
|
||||
compileOnly('me.totalfreedom:BukkitTelnet:4.6.1')
|
||||
compileOnly('me.totalfreedom:TF-LibsDisguises:10.0.26-SNAPSHOT')
|
||||
compileOnly('com.sk89q.worldedit:worldedit-bukkit:7.3.0-SNAPSHOT')
|
||||
compileOnly('net.essentialsx:EssentialsX:2.19.0')
|
||||
|
@ -161,7 +161,7 @@ tasks.withType(Checkstyle) {
|
|||
reports {
|
||||
xml.required = false
|
||||
html.required = true
|
||||
html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
|
||||
html.stylesheet resources.text.fromFile('config/xsl/checkstyle.xsl')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,12 +46,12 @@ public class Pterodactyl extends FreedomService
|
|||
|
||||
if (!admin.isActive() || admin.getRank() != Rank.SENIOR_ADMIN)
|
||||
{
|
||||
FLog.debug("Disabling ptero acc");
|
||||
FLog.debug("Disabling Pterodactyl account");
|
||||
removeAccountFromServer(id);
|
||||
return;
|
||||
}
|
||||
|
||||
FLog.debug("Enabling ptero acc");
|
||||
FLog.debug("Enabling Pterodactyl account");
|
||||
addAccountToServer(id);
|
||||
}
|
||||
|
||||
|
@ -101,15 +101,13 @@ public class Pterodactyl extends FreedomService
|
|||
|
||||
public void restartServer()
|
||||
{
|
||||
ClientServer server = clientAPI.retrieveServerByIdentifier(IDENTIFIER).execute();
|
||||
server.setPower(PowerAction.RESTART).execute();
|
||||
clientAPI.retrieveServerByIdentifier(IDENTIFIER).flatMap(ClientServer::restart).execute();
|
||||
}
|
||||
|
||||
public void fionnTheServer()
|
||||
{
|
||||
ClientServer server = clientAPI.retrieveServerByIdentifier(IDENTIFIER).execute();
|
||||
server.setPower(PowerAction.STOP).execute();
|
||||
plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, () -> server.setPower(PowerAction.KILL).execute(), 0, 60);
|
||||
clientAPI.retrieveServerByIdentifier(IDENTIFIER).flatMap(ClientServer::stop).execute();
|
||||
plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, () -> clientAPI.retrieveServerByIdentifier(IDENTIFIER).flatMap(ClientServer::kill).execute(), 0, 60);
|
||||
}
|
||||
|
||||
public String getURL()
|
||||
|
|
|
@ -54,6 +54,7 @@ import org.bukkit.generator.ChunkGenerator;
|
|||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.spigotmc.SpigotCommand;
|
||||
import org.spigotmc.SpigotConfig;
|
||||
|
||||
public class TotalFreedomMod extends JavaPlugin
|
||||
|
@ -217,8 +218,8 @@ public class TotalFreedomMod extends JavaPlugin
|
|||
// Metrics @ https://bstats.org/plugin/bukkit/TotalFreedomMod/2966
|
||||
new Metrics(this, 2966);
|
||||
|
||||
// little workaround to stop spigot from autorestarting - causing AMP to detach from process.
|
||||
SpigotConfig.config.set("settings.restart-on-crash", false);
|
||||
// Revert AMP changes
|
||||
SpigotConfig.config.set("settings.restart-on-crash", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -287,7 +287,6 @@ public class CoreProtectBridge extends FreedomService
|
|||
if (block != null)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
List<String[]> lookup = coreProtect.blockLookup(block, -1);
|
||||
|
||||
int cooldownTime = 3;
|
||||
|
||||
|
@ -302,6 +301,8 @@ public class CoreProtectBridge extends FreedomService
|
|||
}
|
||||
}
|
||||
|
||||
List<String[]> lookup = coreProtect.blockLookup(block, -1);
|
||||
|
||||
if (!plugin.al.isAdmin(player))
|
||||
{
|
||||
cooldown.put(player.getName(), System.currentTimeMillis());
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Restart the server", usage = "/<command>")
|
||||
@CommandParameters(description = "Fionn the server", usage = "/<command>")
|
||||
public class Command_fionn extends FreedomCommand
|
||||
{
|
||||
@Override
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.bukkit.entity.Player;
|
|||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Restart the server", usage = "/<command> [reason]")
|
||||
@CommandParameters(description = "Restart the server", usage = "/<command> [reason]", aliases="tfmrestart")
|
||||
public class Command_restart extends FreedomCommand
|
||||
{
|
||||
private static final Map<CommandSender, String> RESTART_CONFIRM = new HashMap<>();
|
||||
|
|
|
@ -38,7 +38,6 @@ public class Command_stop extends FreedomCommand
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
msg("Warning: You're about to stop the server. Type /stop again to confirm you want to do this.");
|
||||
|
||||
STOP_CONFIRM.put(sender, reason);
|
||||
|
|
|
@ -85,18 +85,23 @@ discord:
|
|||
# Owner role ID
|
||||
server_owner_role_id: ''
|
||||
|
||||
# Pterodactyl
|
||||
# Pterodactyl (requires Discord verification to be enabled)
|
||||
ptero:
|
||||
# URL - do not leave a trailing forward slash
|
||||
url: ''
|
||||
# The default email domain used to set email addresses for new users - do not include the @
|
||||
default_email_domain: 'example.com'
|
||||
# Server UUID
|
||||
# Long Server UUID (for example: abf9a712-6c5a-4504-b4bc-37f1061b8801)
|
||||
# Do NOT give the short Server UUID
|
||||
server_uuid: ''
|
||||
# Admin panel API key
|
||||
# Create this key by going to Settings > Application API > Create New
|
||||
# Make sure you give it Users and Servers permissions
|
||||
admin_key: ''
|
||||
# Server API key
|
||||
server_key: ''
|
||||
# Client API key
|
||||
# Create a new user and add them as a subuser to the server with all control and subuser privileges.
|
||||
# Then, login to the new user account and go to User Settings. Click on API Credentials and create a new one.
|
||||
client_key: ''
|
||||
|
||||
# The shop
|
||||
shop:
|
||||
|
|
Loading…
Reference in New Issue