From ebb05fa6a6b017c6ce8966352912d01ac15a616b Mon Sep 17 00:00:00 2001
From: ZeroEpoch1969 <13510767+ZeroEpoch1969@users.noreply.github.com>
Date: Mon, 23 Jul 2018 23:54:19 -0700
Subject: [PATCH] Temporarily disable some things
---
TotalFreedomMod.iml | 1 +
.../totalfreedommod/TotalFreedomMod.java | 7 ++++---
.../totalfreedom/totalfreedommod/admin/Admin.java | 4 ++--
.../totalfreedommod/admin/AdminList.java | 11 +++++++++++
.../totalfreedommod/command/Command_warn.java | 12 +++++++++++-
.../totalfreedommod/world/WorldManager.java | 13 +++++++------
src/main/resources/config.yml | 9 +++++++--
src/main/resources/plugin.yml | 2 +-
8 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/TotalFreedomMod.iml b/TotalFreedomMod.iml
index 88d7d31c..05ef5559 100644
--- a/TotalFreedomMod.iml
+++ b/TotalFreedomMod.iml
@@ -91,5 +91,6 @@
+
\ No newline at end of file
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java b/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java
index 9e00ab68..24386f7e 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java
@@ -225,9 +225,10 @@ public class TotalFreedomMod extends AeroPlugin
btb = bridges.registerService(BukkitTelnetBridge.class);
cpb = bridges.registerService(CoreProtectBridge.class);
esb = bridges.registerService(EssentialsBridge.class);
- ldb = bridges.registerService(LibsDisguisesBridge.class);
- web = bridges.registerService(WorldEditBridge.class);
- wgb = bridges.registerService(WorldGuardBridge.class);
+ // Disabled so I can at least load TFM as these plugins aren't updated
+ //ldb = bridges.registerService(LibsDisguisesBridge.class);
+ //web = bridges.registerService(WorldEditBridge.class);
+ //wgb = bridges.registerService(WorldGuardBridge.class);
amp = bridges.registerService(AMP.class);
bridges.start();
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/admin/Admin.java b/src/main/java/me/totalfreedom/totalfreedommod/admin/Admin.java
index 427add8c..03318731 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/admin/Admin.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/admin/Admin.java
@@ -57,10 +57,10 @@ public class Admin implements ConfigLoadable, ConfigSavable, Validatable
private String acFormat = null;
@Getter
@Setter
- private Boolean oldTags = null;
+ private Boolean oldTags = false;
@Getter
@Setter
- private Boolean logStick = null;
+ private Boolean logStick = false;
public static final String CONFIG_FILENAME = "admins.yml";
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java b/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java
index 13b0a6fa..089e4b10 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java
@@ -113,6 +113,17 @@ public class AdminList extends FreedomService
config.save();
}
+ public void messageAllAdmins(String message)
+ {
+ for (Player player : server.getOnlinePlayers())
+ {
+ if (isAdmin(player))
+ {
+ player.sendMessage(message);
+ }
+ }
+ }
+
public synchronized boolean isAdminSync(CommandSender sender)
{
return isAdmin(sender);
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_warn.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_warn.java
index cc1905b8..7d5e8a25 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_warn.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_warn.java
@@ -8,7 +8,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
+@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Warns a player.", usage = "/ ")
public class Command_warn extends FreedomCommand
{
@@ -48,6 +48,16 @@ public class Command_warn extends FreedomCommand
msg(player, ChatColor.RED + "[WARNING] You received a warning: " + warnReason);
msg(ChatColor.GREEN + "You have successfully warned " + player.getName());
+ final StringBuilder adminNotice = new StringBuilder()
+ .append(ChatColor.RED)
+ .append(sender.getName())
+ .append(" - ")
+ .append("Warning: ")
+ .append(player.getName())
+ .append(" - Reason: ")
+ .append(ChatColor.YELLOW)
+ .append(warnReason);
+ plugin.al.messageAllAdmins(adminNotice.toString());
plugin.pl.getPlayer(player).incrementWarnings();
diff --git a/src/main/java/me/totalfreedom/totalfreedommod/world/WorldManager.java b/src/main/java/me/totalfreedom/totalfreedommod/world/WorldManager.java
index e4d0152e..16544874 100644
--- a/src/main/java/me/totalfreedom/totalfreedommod/world/WorldManager.java
+++ b/src/main/java/me/totalfreedom/totalfreedommod/world/WorldManager.java
@@ -36,9 +36,10 @@ public class WorldManager extends FreedomService
@Override
protected void onStart()
{
- flatlands.getWorld();
- adminworld.getWorld();
- masterBuilderWorld.getWorld();
+ // Disabled temporarily
+ //flatlands.getWorld();
+ //adminworld.getWorld();
+ //masterBuilderWorld.getWorld();
// Disable weather
if (ConfigEntry.DISABLE_WEATHER.getBoolean())
@@ -56,9 +57,9 @@ public class WorldManager extends FreedomService
@Override
protected void onStop()
{
- flatlands.getWorld().save();
- adminworld.getWorld().save();
- masterBuilderWorld.getWorld().save();
+ //flatlands.getWorld().save();
+ //adminworld.getWorld().save();
+ //masterBuilderWorld.getWorld().save();
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 7215193c..477fac5e 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -140,8 +140,11 @@ blocked_commands:
- 'n:b:/pp hugeexplosion:You may not use this particle! Please use another.'
- 'n:b:/pp barrier:You may not use this particle! Please use another.'
- 'n:b:/setjail:_'
- - 'n:b:/tfbanlist:Use /banlist to see and wipe the ban list'
- - 'n:b:/tfipbanlist:Use /banlist to see and wipe the ban list'
+ - 'n:b:/function:_'
+ - 'n:b:/defaultgamemode:_'
+ - 'n:b:/data:_'
+ - 'n:b:/datapack:_'
+ - 'n:b:/tag:_'
# Superadmin commands
- 's:b:/save-all:_'
@@ -180,6 +183,8 @@ blocked_commands:
- 's:b:/togglejail:_'
- 's:b:/fill:_'
- 's:b:/flood:_'
+ - 's:b:/team:_'
+ - 'n:b:/bossbar:_'
# Superadmin commands - Auto-eject
- 's:a:/stop:_'
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index cebffe6a..96a65655 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -2,7 +2,7 @@ name: TotalFreedomMod
main: me.totalfreedom.totalfreedommod.TotalFreedomMod
version: ${tfm.build.version}
description: Plugin for the Total Freedom server.
-depend: [Aero, WorldEdit]
+depend: [Aero]
softdepend: [BukkitTelnet, Essentials, LibsDisguises]
authors: [Madgeek1450, Prozza]