From 93a988547720514864b3bd2c2e2b69cf23dc7699 Mon Sep 17 00:00:00 2001 From: ZeroEpoch1969 <13510767+ZeroEpoch1969@users.noreply.github.com> Date: Sat, 11 Jan 2020 20:55:18 -0700 Subject: [PATCH] forgot to do this --- TotalFreedomMod.iml | 90 +++++++++++++------ pom.xml | 8 -- .../bridge/CoreProtectBridge.java | 21 ----- .../bridge/LibsDisguisesBridge.java | 6 +- .../command/Command_disguisetoggle.java | 6 +- .../command/Command_mobpurge.java | 7 -- .../command/Command_undisguiseall.java | 4 +- 7 files changed, 73 insertions(+), 69 deletions(-) diff --git a/TotalFreedomMod.iml b/TotalFreedomMod.iml index 03e5b6f3..13f64d00 100644 --- a/TotalFreedomMod.iml +++ b/TotalFreedomMod.iml @@ -47,9 +47,6 @@ - - - @@ -67,22 +64,63 @@ - - - + + - - - - - - + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -112,16 +150,18 @@ + - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 6438bb69..0851ec29 100644 --- a/pom.xml +++ b/pom.xml @@ -177,14 +177,6 @@ - - - github - GitHub TFPatches Apache Maven Packages - https://maven.pkg.github.com/tfpatches/TotalFreedomMod - - - diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java index 6c1da0cb..1678bffb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/bridge/CoreProtectBridge.java @@ -1,19 +1,5 @@ package me.totalfreedom.totalfreedommod.bridge; -import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.entity.BaseEntity; -import com.sk89q.worldedit.entity.Entity; -import com.sk89q.worldedit.event.platform.BlockInteractEvent; -import com.sk89q.worldedit.extent.Extent; -import com.sk89q.worldedit.function.operation.Operation; -import com.sk89q.worldedit.math.BlockVector2; -import com.sk89q.worldedit.math.BlockVector3; -import com.sk89q.worldedit.regions.Region; -import com.sk89q.worldedit.util.Location; -import com.sk89q.worldedit.world.biome.BaseBiome; -import com.sk89q.worldedit.world.block.BaseBlock; -import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockStateHolder; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; @@ -22,24 +8,17 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.Arrays; import java.util.List; -import javax.annotation.Nullable; import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.util.FLog; -import me.totalfreedom.totalfreedommod.util.FUtil; import net.coreprotect.CoreProtect; import net.coreprotect.CoreProtectAPI; import org.bukkit.Bukkit; -import org.bukkit.ChatColor; import org.bukkit.World; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.PluginManager; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitTask; -import com.sk89q.worldedit.event.extent.EditSessionEvent; public class CoreProtectBridge extends FreedomService { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/LibsDisguisesBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/LibsDisguisesBridge.java index 771d67b0..e6ff80d0 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/bridge/LibsDisguisesBridge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/bridge/LibsDisguisesBridge.java @@ -2,7 +2,7 @@ package me.totalfreedom.totalfreedommod.bridge; import me.libraryaddict.disguise.DisguiseAPI; import me.libraryaddict.disguise.LibsDisguises; -import me.totalfreedom.disguise.DisguiseBlocker; +import me.totalfreedom.libsdisguises.BlockedDisguises; import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.util.FLog; @@ -108,12 +108,12 @@ public class LibsDisguisesBridge extends FreedomService return; } - libsDisguises.toggleUsability(state); + BlockedDisguises.disabled = !state; } public boolean isDisguisesEnabled() { - return DisguiseBlocker.enabled; + return !BlockedDisguises.disabled; } public boolean isEnabled() diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java index 5b19cf72..fd676975 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_disguisetoggle.java @@ -1,6 +1,6 @@ package me.totalfreedom.totalfreedommod.command; -import me.totalfreedom.disguise.DisguiseBlocker; +import me.totalfreedom.libsdisguises.BlockedDisguises; import me.totalfreedom.totalfreedommod.rank.Rank; import me.totalfreedom.totalfreedommod.util.FUtil; import org.bukkit.command.Command; @@ -21,7 +21,7 @@ public class Command_disguisetoggle extends FreedomCommand return true; } - FUtil.adminAction(sender.getName(), (DisguiseBlocker.enabled ? "Disabling" : "Enabling") + " disguises", false); + FUtil.adminAction(sender.getName(), (BlockedDisguises.disabled ? "Enabling" : "Disabling") + " disguises", false); if (plugin.ldb.isDisguisesEnabled()) { @@ -33,7 +33,7 @@ public class Command_disguisetoggle extends FreedomCommand plugin.ldb.setDisguisesEnabled(true); } - msg("Disguises are now " + (DisguiseBlocker.enabled ? "enabled." : "disabled.")); + msg("Disguises are now " + (BlockedDisguises.disabled ? "disabled." : "enabled.")); return true; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java index 6d792349..159c9d55 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java @@ -1,8 +1,6 @@ package me.totalfreedom.totalfreedommod.command; -import com.sk89q.worldedit.blocks.metadata.MobType; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import me.totalfreedom.totalfreedommod.rank.Rank; @@ -14,15 +12,10 @@ import org.bukkit.ChatColor; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; -import org.bukkit.entity.Ambient; -import org.bukkit.entity.Creature; -import org.bukkit.entity.EnderDragon; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; -import org.bukkit.entity.Ghast; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; -import org.bukkit.entity.Slime; @CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH) @CommandParameters(description = "Purge all mobs in all worlds.", usage = "/ [name]", aliases = "mp") diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_undisguiseall.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_undisguiseall.java index 804517f7..676a1a99 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_undisguiseall.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_undisguiseall.java @@ -1,6 +1,6 @@ package me.totalfreedom.totalfreedommod.command; -import me.totalfreedom.disguise.DisguiseBlocker; +import me.totalfreedom.libsdisguises.BlockedDisguises; import me.totalfreedom.totalfreedommod.rank.Rank; import me.totalfreedom.totalfreedommod.util.FUtil; import org.bukkit.command.Command; @@ -21,7 +21,7 @@ public class Command_undisguiseall extends FreedomCommand return true; } - if (!DisguiseBlocker.enabled) + if (BlockedDisguises.disabled) { msg("Disguises are not enabled."); return true;