Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Removed some un-needed events.
What's a Spartan...
  • Loading branch information
TrueDarkLord committed Feb 16, 2024
1 parent d928492 commit 1716ebf
Show file tree
Hide file tree
Showing 21 changed files with 1 addition and 359 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import com.badbones69.crazyenchantments.paper.api.FileManager.Files;
import com.badbones69.crazyenchantments.paper.api.PluginSupport;
import com.badbones69.crazyenchantments.paper.api.PluginSupport.SupportedPlugins;
import com.badbones69.crazyenchantments.paper.api.economy.Currency;
import com.badbones69.crazyenchantments.paper.api.enums.Messages;
import com.badbones69.crazyenchantments.paper.api.objects.ItemBuilder;
import com.badbones69.crazyenchantments.paper.api.objects.enchants.EnchantmentType;
import com.badbones69.crazyenchantments.paper.api.support.anticheats.SpartanSupport;
import com.badbones69.crazyenchantments.paper.api.support.misc.OraxenSupport;
import com.badbones69.crazyenchantments.paper.utilities.misc.ColorUtils;
import com.badbones69.crazyenchantments.paper.utilities.misc.EventUtils;
Expand Down Expand Up @@ -42,8 +40,6 @@ public class Methods {

private final OraxenSupport oraxenSupport = starter.getOraxenSupport();

private final SpartanSupport spartanSupport = starter.getSpartanSupport();

public EnchantmentType getFromName(String name) {
for (EnchantmentType enchantmentType : starter.getInfoMenuManager().getEnchantmentTypes()) {
if (enchantmentType.getName().equalsIgnoreCase(name)) return enchantmentType;
Expand Down Expand Up @@ -349,14 +345,6 @@ public void explode(Entity player) {
if (player.getName().equalsIgnoreCase(entity.getName())) continue;
en.damage(5D);

if (en instanceof Player) {
if (SupportedPlugins.SPARTAN.isPluginLoaded()) {
spartanSupport.cancelSpeed((Player) player);
spartanSupport.cancelNormalMovements((Player) player);
spartanSupport.cancelNoFall((Player) player);
}
}

en.setVelocity(en.getLocation().toVector().subtract(player.getLocation().toVector()).normalize().multiply(1).setY(.5));
}
}
Expand Down Expand Up @@ -402,13 +390,7 @@ public void explode(Entity entity, Entity arrow) {
livingEntity.damage(5D);

livingEntity.setVelocity(livingEntity.getLocation().toVector().subtract(arrow.getLocation().toVector()).normalize().multiply(1).setY(.5));
if (!(livingEntity instanceof Player player)) continue;

if (SupportedPlugins.SPARTAN.isPluginLoaded()) {
spartanSupport.cancelSpeed(player);
spartanSupport.cancelNormalMovements(player);
spartanSupport.cancelNoFall(player);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.badbones69.crazyenchantments.paper.api.managers.ShopManager;
import com.badbones69.crazyenchantments.paper.api.managers.WingsManager;
import com.badbones69.crazyenchantments.paper.api.support.anticheats.NoCheatPlusSupport;
import com.badbones69.crazyenchantments.paper.api.support.anticheats.SpartanSupport;
import com.badbones69.crazyenchantments.paper.api.support.claims.SuperiorSkyBlockSupport;
import com.badbones69.crazyenchantments.paper.api.support.misc.OraxenSupport;
import com.badbones69.crazyenchantments.paper.controllers.EnchantmentControl;
Expand Down Expand Up @@ -48,7 +47,6 @@ public class Starter {
private VaultSupport vaultSupport;
private OraxenSupport oraxenSupport;
private NoCheatPlusSupport noCheatPlusSupport;
private SpartanSupport spartanSupport;

// Plugin Managers.
private ArmorEnchantmentManager armorEnchantmentManager;
Expand Down Expand Up @@ -85,7 +83,6 @@ public void run() {
if (SupportedPlugins.NO_CHEAT_PLUS.isPluginLoaded()) this.noCheatPlusSupport = new NoCheatPlusSupport();

if (SupportedPlugins.ORAXEN.isPluginLoaded()) this.oraxenSupport = new OraxenSupport();
if (SupportedPlugins.SPARTAN.isPluginLoaded()) this.spartanSupport = new SpartanSupport();

// Methods
this.methods = new Methods();
Expand Down Expand Up @@ -182,10 +179,6 @@ public NoCheatPlusSupport getNoCheatPlusSupport() {
return this.noCheatPlusSupport;
}

public SpartanSupport getSpartanSupport() {
return this.spartanSupport;
}

// Economy Management.
public CurrencyAPI getCurrencyAPI() {
return this.currencyAPI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;

import java.util.HashMap;
import java.util.Map;

public class PluginSupport {
Expand Down Expand Up @@ -161,7 +160,6 @@ public enum SupportedPlugins {
// WILD_STACKER("WildStacker"),

// Anti Cheats
SPARTAN("Spartan"),
NO_CHEAT_PLUS("NoCheatPlus"),
//VULCAN("Vulcan"),

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
Expand Down
Loading

0 comments on commit 1716ebf

Please sign in to comment.