From 4baae80598bd76d55d2e552a7f36cd0316a09982 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 8 Dec 2020 19:50:38 +0000 Subject: [PATCH] Continued development --- .../illusioner/nms/api/IllusionerWrapper.java | 2 +- .../illusioner/v1_16_R3/EntityIllusioner.java | 7 +- .../illusioner/v1_16_R3/Illusioner.java | 4 +- Plugin/build.gradle | 14 +-- .../illusioner/AttackListeners.java | 105 ------------------ .../illusioner/illusioner/BlockStructure.java | 33 ++++++ .../illusioner/illusioner/DeathListeners.java | 24 ---- .../illusioner/IllusionerManager.java | 7 ++ .../illusioner/illusioner/SpawnListeners.java | 36 ------ .../illusioner/listeners/AttackListeners.java | 77 +++++++++++++ .../illusioner/listeners/DeathListeners.java | 28 +++++ .../illusioner/listeners/SpawnListeners.java | 50 +++++++++ .../illusioner/options/GameplayOptions.java | 96 ++++++++++++++++ .../illusioner/options/IllusionerOptions.java | 79 +++++++++++++ .../anticheat/AnticheatManager.java | 49 -------- .../anticheat/AnticheatWrapper.java | 23 ---- .../anticheat/plugins/AnticheatAAC.java | 40 ------- .../anticheat/plugins/AnticheatMatrix.java | 40 ------- .../anticheat/plugins/AnticheatNCP.java | 37 ------ .../anticheat/plugins/AnticheatSpartan.java | 40 ------- .../antigrief/AntigriefManager.java | 66 ----------- .../antigrief/AntigriefWrapper.java | 48 -------- .../plugins/AntigriefFactionsUUID.java | 71 ------------ .../plugins/AntigriefGriefPrevention.java | 56 ---------- .../antigrief/plugins/AntigriefKingdoms.java | 60 ---------- .../antigrief/plugins/AntigriefLands.java | 64 ----------- .../antigrief/plugins/AntigriefTowny.java | 50 --------- .../plugins/AntigriefWorldGuard.java | 79 ------------- .../anvilgui/AnvilGUIIntegration.java | 17 --- .../anvilgui/AnvilGUIManager.java | 35 ------ .../anvilgui/plugins/AnvilGUIImpl.java | 21 ---- .../illusioner/integrations/drops/Drops.java | 12 ++ .../integrations/mcmmo/McmmoIntegration.java | 14 --- .../integrations/mcmmo/McmmoManager.java | 41 ------- .../mcmmo/plugins/McmmoIntegrationImpl.java | 20 ---- .../willfp/illusioner/nms/NMSIllusioner.java | 5 +- .../illusioner/util/internal/Loader.java | 38 +------ .../util/internal/OptionedSound.java | 33 ++++++ Plugin/src/main/resources/plugin.yml | 11 -- lib/SpartanAPI.jar | Bin 15405 -> 0 bytes 40 files changed, 430 insertions(+), 1102 deletions(-) delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/AttackListeners.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/BlockStructure.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/DeathListeners.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/IllusionerManager.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/SpawnListeners.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/AttackListeners.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/DeathListeners.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/SpawnListeners.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/options/GameplayOptions.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/illusioner/options/IllusionerOptions.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatManager.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatWrapper.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatAAC.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatMatrix.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatNCP.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatSpartan.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefManager.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefWrapper.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefFactionsUUID.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefGriefPrevention.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefKingdoms.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefLands.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefTowny.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefWorldGuard.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIIntegration.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIManager.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/plugins/AnvilGUIImpl.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/drops/Drops.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoIntegration.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoManager.java delete mode 100644 Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/plugins/McmmoIntegrationImpl.java create mode 100644 Plugin/src/main/java/com/willfp/illusioner/util/internal/OptionedSound.java delete mode 100644 lib/SpartanAPI.jar diff --git a/NMS/API/src/main/java/com/willfp/illusioner/nms/api/IllusionerWrapper.java b/NMS/API/src/main/java/com/willfp/illusioner/nms/api/IllusionerWrapper.java index ab341c0..80e7170 100644 --- a/NMS/API/src/main/java/com/willfp/illusioner/nms/api/IllusionerWrapper.java +++ b/NMS/API/src/main/java/com/willfp/illusioner/nms/api/IllusionerWrapper.java @@ -6,5 +6,5 @@ import org.bukkit.Location; * NMS Interface for managing illusioner bosses */ public interface IllusionerWrapper { - EntityIllusionerWrapper spawn(Location location, double maxHealth, double attackDamage); + EntityIllusionerWrapper spawn(Location location, double maxHealth, double attackDamage, String name); } \ No newline at end of file diff --git a/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/EntityIllusioner.java b/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/EntityIllusioner.java index b20d2ea..c2ef225 100644 --- a/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/EntityIllusioner.java +++ b/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/EntityIllusioner.java @@ -15,8 +15,11 @@ import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitRunnable; public class EntityIllusioner extends EntityIllagerIllusioner implements EntityIllusionerWrapper { - public EntityIllusioner(Location location, double maxHealth, double attackDamage) { + private final String displayName; + + public EntityIllusioner(Location location, double maxHealth, double attackDamage, String name) { super(EntityTypes.ILLUSIONER, ((CraftWorld) location.getWorld()).getHandle()); + this.displayName = name; this.setPosition(location.getX(), location.getY(), location.getZ()); @@ -43,7 +46,7 @@ public class EntityIllusioner extends EntityIllagerIllusioner implements EntityI @Override public void createBossbar(Plugin plugin, BarColor color, BarStyle style) { - String name = this.getName(); + String name = this.getDisplayName().getText(); BossBar bossBar = Bukkit.getServer().createBossBar(name, color, style, (BarFlag) null); Bukkit.getServer().getOnlinePlayers().forEach(bossBar::addPlayer); LivingEntity entity = (LivingEntity) this.getBukkitEntity(); diff --git a/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/Illusioner.java b/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/Illusioner.java index 0d98190..6cc6425 100644 --- a/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/Illusioner.java +++ b/NMS/v1_16_R3/src/main/java/com/willfp/illusioner/v1_16_R3/Illusioner.java @@ -7,8 +7,8 @@ import org.bukkit.craftbukkit.v1_16_R3.CraftWorld; public class Illusioner implements IllusionerWrapper { @Override - public EntityIllusionerWrapper spawn(Location location, double maxHealth, double attackDamage) { - EntityIllusioner illusioner = new EntityIllusioner(location, maxHealth, attackDamage); + public EntityIllusionerWrapper spawn(Location location, double maxHealth, double attackDamage, String name) { + EntityIllusioner illusioner = new EntityIllusioner(location, maxHealth, attackDamage, name); ((CraftWorld) location.getWorld()).getHandle().addEntity(illusioner); return illusioner; } diff --git a/Plugin/build.gradle b/Plugin/build.gradle index 5fd323a..39c86ca 100644 --- a/Plugin/build.gradle +++ b/Plugin/build.gradle @@ -13,20 +13,8 @@ dependencies { implementation 'org.bstats:bstats-bukkit:1.7' compileOnly 'org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT' compileOnly 'commons-io:commons-io:2.8.0' - compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT' - compileOnly 'com.github.TechFortress:GriefPrevention:16.14.0' - compileOnly 'com.massivecraft:Factions:1.6.9.5-U0.5.10' - compileOnly 'com.github.cryptomorin:kingdoms:1.10.3.1' - shadow files('../lib/SpartanAPI.jar') - compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0' - compileOnly 'com.github.angeschossen:LandsAPI:4.7.3' - compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT' - compileOnly 'de.janmm14:aac-api:4.2.0' - compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd' - compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT' - compileOnly 'com.destroystokyo.paper:paper-api:1.16.3-R0.1-SNAPSHOT' - compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.157' compileOnly 'me.clip:placeholderapi:2.10.9' + compileOnly 'com.willfp:EcoEnchants:5.3.1' } shadowJar { diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/AttackListeners.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/AttackListeners.java deleted file mode 100644 index b72e690..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/illusioner/AttackListeners.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.willfp.illusioner.illusioner; - -import com.willfp.illusioner.util.NumberUtils; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.ExperienceOrb; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityDamageByEntityEvent; -import org.bukkit.event.entity.EntityDamageEvent; -import org.bukkit.inventory.ItemStack; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -public class AttackListeners implements Listener { - @EventHandler - public void onIllusionerAttack(EntityDamageByEntityEvent event) { - if(!event.getDamager().getType().equals(EntityType.ILLUSIONER)) - return; - - if(!(event.getEntity() instanceof Player)) - return; - - Player player = (Player) event.getEntity(); - - player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 40, 1)); - player.playSound(player.getLocation(), Sound.ENTITY_ILLUSIONER_CAST_SPELL, 1, 1f); - if(!player.hasPotionEffect(PotionEffectType.CONFUSION)) { - player.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 200, 10)); - player.playSound(player.getLocation(), Sound.ENTITY_ILLUSIONER_CAST_SPELL, 1, 2f); - } - if(NumberUtils.randInt(1, 10) <= 2) { - player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 40, 2)); - player.playSound(player.getLocation(), Sound.ENTITY_ILLUSIONER_CAST_SPELL, 1, 2f); - } - if(NumberUtils.randInt(1, 10) <= 2) { - player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 40, 2)); - player.playSound(player.getLocation(), Sound.ENTITY_ILLUSIONER_CAST_SPELL, 1, 2f); - } - - if(NumberUtils.randInt(1, 20) == 1) { - List hotbar = new ArrayList<>(); - for(int i = 0; i<9; i++) { - hotbar.add(player.getInventory().getItem(i)); - } - Collections.shuffle(hotbar); - int i2 = 0; - for(ItemStack item : hotbar) { - player.getInventory().setItem(i2, item); - i2++; - } - player.playSound(player.getLocation(), Sound.ENTITY_ENDER_PEARL_THROW, 1, 0.5f); - } - } - - @EventHandler - public void onIllusionerDamageByPlayer(EntityDamageByEntityEvent event) { - if(!event.getEntity().getType().equals(EntityType.ILLUSIONER)) - return; - - if(!(event.getDamager() instanceof Player)) - return; - - Player player = (Player) event.getDamager(); - - if(NumberUtils.randInt(1, 10) == 1) { - Location loc = player.getLocation().add(NumberUtils.randInt(2,6), 0, NumberUtils.randInt(2,6)); - while(!loc.getBlock().getType().equals(Material.AIR)) { - loc.add(0, 1, 0); - } - player.getWorld().spawnEntity(loc, EntityType.EVOKER); - player.playSound(player.getLocation(), Sound.ENTITY_EVOKER_PREPARE_ATTACK, 1, 2f); - } - - if(NumberUtils.randInt(1, 10) == 1) { - Location loc = player.getLocation().add(NumberUtils.randInt(2,6), 0, NumberUtils.randInt(2,6)); - while(!loc.getBlock().getType().equals(Material.AIR)) { - loc.add(0, 1, 0); - } - player.getWorld().spawnEntity(loc, EntityType.VINDICATOR); - player.playSound(player.getLocation(), Sound.ENTITY_EVOKER_PREPARE_ATTACK, 1, 2f); - } - - ExperienceOrb experienceOrb = (ExperienceOrb) event.getEntity().getWorld().spawnEntity(event.getEntity().getLocation(), EntityType.EXPERIENCE_ORB); - experienceOrb.setExperience(NumberUtils.randInt(5,20)); - } - - @EventHandler - public void onIllusionerDamage(EntityDamageEvent event) { - if(!event.getEntity().getType().equals(EntityType.ILLUSIONER)) - return; - - if(event.getCause().equals(EntityDamageEvent.DamageCause.ENTITY_EXPLOSION) - || event.getCause().equals(EntityDamageEvent.DamageCause.BLOCK_EXPLOSION)) { - event.setCancelled(true); - } - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/BlockStructure.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/BlockStructure.java new file mode 100644 index 0000000..cf86fb9 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/BlockStructure.java @@ -0,0 +1,33 @@ +package com.willfp.illusioner.illusioner; + +import org.bukkit.Material; + +public class BlockStructure { + private final Material bottom; + private final Material middle; + private final Material top; + + public BlockStructure(Material bottom, Material middle, Material top) { + this.bottom = bottom; + this.middle = middle; + this.top = top; + } + + public Material getBottom() { + return bottom; + } + + public Material getMiddle() { + return middle; + } + + public Material getTop() { + return top; + } + + public static boolean matches(BlockStructure structure) { + return structure.getBottom().equals(IllusionerManager.OPTIONS.getSpawnStructure().getBottom()) + && structure.getMiddle().equals(IllusionerManager.OPTIONS.getSpawnStructure().getMiddle()) + && structure.getTop().equals(IllusionerManager.OPTIONS.getSpawnStructure().getTop()); + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/DeathListeners.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/DeathListeners.java deleted file mode 100644 index 8924385..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/illusioner/DeathListeners.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.willfp.illusioner.illusioner; - -import com.willfp.illusioner.util.NumberUtils; -import org.bukkit.Sound; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.ExperienceOrb; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityDeathEvent; - -public class DeathListeners implements Listener { - @EventHandler - public void onIllusionerDeath(EntityDeathEvent event) { - if(!event.getEntityType().equals(EntityType.ILLUSIONER)) - return; - - event.getEntity().getWorld().playSound(event.getEntity().getLocation(), Sound.ENTITY_EVOKER_PREPARE_WOLOLO, 50, 0.8f); - event.getEntity().getWorld().playSound(event.getEntity().getLocation(), Sound.ENTITY_ILLUSIONER_PREPARE_BLINDNESS, 50, 1f); - event.getEntity().getWorld().playSound(event.getEntity().getLocation(), Sound.ENTITY_WITHER_DEATH, 50, 2f); - - ExperienceOrb eo1 = (ExperienceOrb) event.getEntity().getWorld().spawnEntity(event.getEntity().getLocation(), EntityType.EXPERIENCE_ORB); - eo1.setExperience(NumberUtils.randInt(20000,25000)); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/IllusionerManager.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/IllusionerManager.java new file mode 100644 index 0000000..027d3f9 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/IllusionerManager.java @@ -0,0 +1,7 @@ +package com.willfp.illusioner.illusioner; + +import com.willfp.illusioner.illusioner.options.IllusionerOptions; + +public class IllusionerManager { + public static final IllusionerOptions OPTIONS = new IllusionerOptions(); +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/SpawnListeners.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/SpawnListeners.java deleted file mode 100644 index 459e8cd..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/illusioner/SpawnListeners.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.willfp.illusioner.illusioner; - -import com.willfp.illusioner.IllusionerPlugin; -import com.willfp.illusioner.nms.NMSIllusioner; -import com.willfp.illusioner.nms.api.EntityIllusionerWrapper; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.boss.BarColor; -import org.bukkit.boss.BarStyle; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockPlaceEvent; - -public class SpawnListeners implements Listener { - @EventHandler - public void onSpawn(BlockPlaceEvent event) { - if(!event.getBlock().getType().equals(Material.DRAGON_HEAD)) - return; - if(!event.getBlock().getLocation().add(0,-1,0).getBlock().getType().equals(Material.BEACON)) - return; - if(!event.getBlock().getLocation().add(0,-2,0).getBlock().getType().equals(Material.DIAMOND_BLOCK)) - return; - - try { - event.getBlock().getLocation().getBlock().setType(Material.AIR); - event.getBlock().getLocation().add(0, -1, 0).getBlock().setType(Material.AIR); - event.getBlock().getLocation().add(0, -2, 0).getBlock().setType(Material.AIR); - - event.getBlock().getWorld().playSound(event.getBlock().getLocation(), Sound.ENTITY_ILLUSIONER_MIRROR_MOVE, 1000, 0.5f); - event.getBlock().getWorld().playSound(event.getBlock().getLocation(), Sound.ENTITY_WITHER_SPAWN, 1000, 2f); - - EntityIllusionerWrapper illusioner = NMSIllusioner.spawn(event.getBlock().getLocation(), 600, 50); - illusioner.createBossbar(IllusionerPlugin.getInstance(), BarColor.BLUE, BarStyle.SOLID); - } catch(Exception ignored) {} - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/AttackListeners.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/AttackListeners.java new file mode 100644 index 0000000..88ed8e4 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/AttackListeners.java @@ -0,0 +1,77 @@ +package com.willfp.illusioner.illusioner.listeners; + +import com.willfp.illusioner.illusioner.IllusionerManager; +import com.willfp.illusioner.util.NumberUtils; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class AttackListeners implements Listener { + @EventHandler(ignoreCancelled = true) + public void onIllusionerAttack(EntityDamageByEntityEvent event) { + if(!event.getDamager().getType().equals(EntityType.ILLUSIONER)) + return; + + if(!(event.getEntity() instanceof Player)) + return; + + Player player = (Player) event.getEntity(); + + IllusionerManager.OPTIONS.getGameplayOptions().getEffectOptions().forEach(effectOption -> { + if(NumberUtils.randFloat(0, 100) > effectOption.getChance()) + return; + + player.addPotionEffect(new PotionEffect(effectOption.getEffectType(), effectOption.getDuration(), effectOption.getLevel() - 1)); + }); + + if(IllusionerManager.OPTIONS.getGameplayOptions().isShuffle()) { + if(NumberUtils.randFloat(0, 100) < IllusionerManager.OPTIONS.getGameplayOptions().getShuffleChance()) { + List hotbar = new ArrayList<>(); + for(int i = 0; i<9; i++) { + hotbar.add(player.getInventory().getItem(i)); + } + Collections.shuffle(hotbar); + int i2 = 0; + for(ItemStack item : hotbar) { + player.getInventory().setItem(i2, item); + i2++; + } + player.playSound(player.getLocation(), Sound.ENTITY_ENDER_PEARL_THROW, 1, 0.5f); + } + } + + IllusionerManager.OPTIONS.getGameplayOptions().getSummonerOptions().forEach(summonerOption -> { + if(NumberUtils.randFloat(0, 100) > summonerOption.getChance()) + return; + + Location loc = player.getLocation().add(NumberUtils.randInt(2,6), 0, NumberUtils.randInt(2,6)); + while(!loc.getBlock().getType().equals(Material.AIR)) { + loc.add(0, 1, 0); + } + player.getWorld().spawnEntity(loc, summonerOption.getType()); + }); + } + + @EventHandler(ignoreCancelled = true) + public void onIllusionerDamage(EntityDamageEvent event) { + if(!event.getEntity().getType().equals(EntityType.ILLUSIONER)) + return; + + if(IllusionerManager.OPTIONS.getGameplayOptions().isIgnoreExplosionDamage()) { + if(event.getCause().equals(EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) || event.getCause().equals(EntityDamageEvent.DamageCause.ENTITY_EXPLOSION)) + event.setCancelled(true); + } + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/DeathListeners.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/DeathListeners.java new file mode 100644 index 0000000..8531fa7 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/DeathListeners.java @@ -0,0 +1,28 @@ +package com.willfp.illusioner.illusioner.listeners; + +import com.willfp.illusioner.events.entitydeathbyentity.EntityDeathByEntityEvent; +import com.willfp.illusioner.illusioner.IllusionerManager; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; + +public class DeathListeners implements Listener { + @EventHandler + public void onIllusionerDeath(EntityDeathByEntityEvent event) { + if(!event.getDeathEvent().getEntityType().equals(EntityType.ILLUSIONER)) + return; + + IllusionerManager.OPTIONS.getDeathSounds().forEach(optionedSound -> { + if(optionedSound.isBroadcast()) { + event.getKiller().getWorld().playSound(event.getVictim().getLocation(), optionedSound.getSound(), optionedSound.getVolume(), optionedSound.getPitch()); + } else { + if(event.getKiller() instanceof Player) { + ((Player) event.getKiller()).playSound(event.getVictim().getLocation(), optionedSound.getSound(), optionedSound.getVolume(), optionedSound.getPitch()); + } + } + }); + + event.getDeathEvent().setDroppedExp(IllusionerManager.OPTIONS.generateXp()); + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/SpawnListeners.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/SpawnListeners.java new file mode 100644 index 0000000..d71783d --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/listeners/SpawnListeners.java @@ -0,0 +1,50 @@ +package com.willfp.illusioner.illusioner.listeners; + +import com.willfp.illusioner.IllusionerPlugin; +import com.willfp.illusioner.illusioner.BlockStructure; +import com.willfp.illusioner.illusioner.IllusionerManager; +import com.willfp.illusioner.nms.NMSIllusioner; +import com.willfp.illusioner.nms.api.EntityIllusionerWrapper; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockPlaceEvent; + +import java.util.HashSet; +import java.util.Set; + +public class SpawnListeners implements Listener { + @EventHandler + public void onSpawn(BlockPlaceEvent event) { + boolean matches = false; + Set match = new HashSet<>(); + for(int i = 0; i < 3; i++) { + Block block1 = event.getBlock().getRelative(0, i, 0); + Block block2 = event.getBlock().getRelative(0, -1 + i, 0); + Block block3 = event.getBlock().getRelative(0, -2 + i, 0); + matches = BlockStructure.matches(new BlockStructure(block1.getType(), block2.getType(), block3.getType())); + if(matches) { + match.add(block1); + match.add(block2); + match.add(block3); + break; + } + } + + if(!matches) + return; + + match.forEach(block -> block.setType(Material.AIR)); + IllusionerManager.OPTIONS.getSpawnSounds().forEach(optionedSound -> { + if(optionedSound.isBroadcast()) { + event.getBlock().getWorld().playSound(event.getBlock().getLocation(), optionedSound.getSound(), optionedSound.getVolume(), optionedSound.getPitch()); + } else { + event.getPlayer().playSound(event.getBlock().getLocation(), optionedSound.getSound(), optionedSound.getVolume(), optionedSound.getPitch()); + } + }); + + EntityIllusionerWrapper illusioner = NMSIllusioner.spawn(event.getBlock().getLocation(), IllusionerManager.OPTIONS.getMaxHealth(), IllusionerManager.OPTIONS.getAttackDamage(), IllusionerManager.OPTIONS.getName()); + illusioner.createBossbar(IllusionerPlugin.getInstance(), IllusionerManager.OPTIONS.getColor(), IllusionerManager.OPTIONS.getStyle()); + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/options/GameplayOptions.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/options/GameplayOptions.java new file mode 100644 index 0000000..40d4128 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/options/GameplayOptions.java @@ -0,0 +1,96 @@ +package com.willfp.illusioner.illusioner.options; + +import com.willfp.illusioner.util.internal.OptionedSound; +import org.bukkit.entity.EntityType; +import org.bukkit.potion.PotionEffectType; + +import java.util.HashSet; +import java.util.Set; + +public class GameplayOptions { + private OptionedSound hitSound; + + private final Set effectOptions = new HashSet<>(); + private final Set summonerOptions = new HashSet<>(); + + private boolean shuffle; + private double shuffleChance; + + private boolean ignoreExplosionDamage; + + public void reload() { + + } + + public OptionedSound getHitSound() { + return hitSound; + } + + public Set getEffectOptions() { + return effectOptions; + } + + public Set getSummonerOptions() { + return summonerOptions; + } + + public double getShuffleChance() { + return shuffleChance; + } + + public boolean isShuffle() { + return shuffle; + } + + public boolean isIgnoreExplosionDamage() { + return ignoreExplosionDamage; + } + + public static class EffectOption { + private final double chance; + private final int level; + private final PotionEffectType effectType; + private final int duration; + + public EffectOption(double chance, int level, int duration, PotionEffectType effectType) { + this.chance = chance; + this.level = level; + this.effectType = effectType; + this.duration = duration; + } + + public double getChance() { + return chance; + } + + public int getLevel() { + return level; + } + + public PotionEffectType getEffectType() { + return effectType; + } + + public int getDuration() { + return duration; + } + } + + public static class SummonerOption { + private final double chance; + private final EntityType type; + + public SummonerOption(double chance, EntityType type) { + this.chance = chance; + this.type = type; + } + + public double getChance() { + return chance; + } + + public EntityType getType() { + return type; + } + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/illusioner/options/IllusionerOptions.java b/Plugin/src/main/java/com/willfp/illusioner/illusioner/options/IllusionerOptions.java new file mode 100644 index 0000000..71a0f2c --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/illusioner/options/IllusionerOptions.java @@ -0,0 +1,79 @@ +package com.willfp.illusioner.illusioner.options; + +import com.willfp.illusioner.illusioner.BlockStructure; +import com.willfp.illusioner.util.NumberUtils; +import com.willfp.illusioner.util.internal.OptionedSound; +import com.willfp.illusioner.util.tuplets.Pair; +import org.bukkit.boss.BarColor; +import org.bukkit.boss.BarStyle; +import org.bukkit.inventory.ItemStack; + +import java.util.Set; + +public class IllusionerOptions { + private BarColor color; + private BarStyle style; + private String name; + private Set spawnSounds; + private Set deathSounds; + private Pair xpBounds; + private BlockStructure spawnStructure; + private double maxHealth; + private double attackDamage; + private Set drops; + private GameplayOptions gameplayOptions; + + public IllusionerOptions() { + reload(); + } + + public void reload() { + + + gameplayOptions.reload(); + } + + public BarColor getColor() { + return color; + } + + public BarStyle getStyle() { + return style; + } + + public String getName() { + return name; + } + + public Set getSpawnSounds() { + return spawnSounds; + } + + public Set getDeathSounds() { + return deathSounds; + } + + public int generateXp() { + return NumberUtils.randInt(xpBounds.getFirst(), xpBounds.getSecond()); + } + + public BlockStructure getSpawnStructure() { + return spawnStructure; + } + + public double getMaxHealth() { + return maxHealth; + } + + public double getAttackDamage() { + return attackDamage; + } + + public Set getDrops() { + return drops; + } + + public GameplayOptions getGameplayOptions() { + return gameplayOptions; + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatManager.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatManager.java deleted file mode 100644 index 92a6dbd..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatManager.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.willfp.illusioner.integrations.anticheat; - -import com.willfp.illusioner.IllusionerPlugin; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.event.Listener; - -import java.util.HashSet; -import java.util.Set; - -/** - * Utility class for Anticheat Integrations - */ -public class AnticheatManager { - private static final Set anticheats = new HashSet<>(); - - /** - * Register a new anticheat - * - * @param anticheat The anticheat to register - */ - public static void register(AnticheatWrapper anticheat) { - if (anticheat instanceof Listener) { - Bukkit.getPluginManager().registerEvents((Listener) anticheat, IllusionerPlugin.getInstance()); - } - anticheats.add(anticheat); - } - - /** - * Exempt a player from triggering anticheats - * - * @param player The player to exempt - */ - public static void exemptPlayer(Player player) { - anticheats.forEach(anticheat -> anticheat.exempt(player)); - } - - /** - * Unexempt a player from triggering anticheats - * This is ran a tick after it is called to ensure that there are no event timing conflicts - * - * @param player The player to remove the exemption - */ - public static void unexemptPlayer(Player player) { - Bukkit.getScheduler().runTaskLater(IllusionerPlugin.getInstance(), () -> { - anticheats.forEach(anticheat -> anticheat.unexempt(player)); - }, 1); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatWrapper.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatWrapper.java deleted file mode 100644 index 4c4b0df..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/AnticheatWrapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.willfp.illusioner.integrations.anticheat; - -import com.willfp.illusioner.integrations.Integration; -import org.bukkit.entity.Player; - -/** - * Interface for anticheat integrations - */ -public interface AnticheatWrapper extends Integration { - /** - * Exempt a player from checks - * - * @param player The player to exempt - */ - void exempt(Player player); - - /** - * Unexempt a player from checks - * - * @param player The player to unexempt - */ - void unexempt(Player player); -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatAAC.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatAAC.java deleted file mode 100644 index a78ccc3..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatAAC.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.willfp.illusioner.integrations.anticheat.plugins; - -import com.willfp.illusioner.integrations.anticheat.AnticheatWrapper; -import me.konsolas.aac.api.PlayerViolationEvent; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -public class AnticheatAAC implements AnticheatWrapper, Listener { - private final Set exempt = new HashSet<>(); - - @Override - public String getPluginName() { - return "AAC"; - } - - @Override - public void exempt(Player player) { - this.exempt.add(player.getUniqueId()); - } - - @Override - public void unexempt(Player player) { - this.exempt.remove(player.getUniqueId()); - } - - @EventHandler(priority = EventPriority.LOWEST) - private void onViolate(PlayerViolationEvent event) { - if (!exempt.contains(event.getPlayer().getUniqueId())) { - return; - } - - event.setCancelled(true); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatMatrix.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatMatrix.java deleted file mode 100644 index 48e8aa4..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatMatrix.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.willfp.illusioner.integrations.anticheat.plugins; - -import com.willfp.illusioner.integrations.anticheat.AnticheatWrapper; -import me.rerere.matrix.api.events.PlayerViolationEvent; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -public class AnticheatMatrix implements AnticheatWrapper, Listener { - private final Set exempt = new HashSet<>(); - - @Override - public String getPluginName() { - return "Matrix"; - } - - @Override - public void exempt(Player player) { - this.exempt.add(player.getUniqueId()); - } - - @Override - public void unexempt(Player player) { - this.exempt.remove(player.getUniqueId()); - } - - @EventHandler(priority = EventPriority.LOWEST) - private void onViolate(PlayerViolationEvent event) { - if (!exempt.contains(event.getPlayer().getUniqueId())) { - return; - } - - event.setCancelled(true); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatNCP.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatNCP.java deleted file mode 100644 index e94a996..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatNCP.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.willfp.illusioner.integrations.anticheat.plugins; - -import com.willfp.illusioner.integrations.anticheat.AnticheatWrapper; -import fr.neatmonster.nocheatplus.checks.CheckType; -import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager; -import org.bukkit.entity.Player; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -public class AnticheatNCP implements AnticheatWrapper { - private final Set exempt = new HashSet<>(); - - @Override - public String getPluginName() { - return "NCP"; - } - - @Override - public void exempt(Player player) { - if (!NCPExemptionManager.isExempted(player, CheckType.ALL)) { - return; - } - - if (exempt.add(player.getUniqueId())) { - NCPExemptionManager.exemptPermanently(player, CheckType.ALL); - } - } - - @Override - public void unexempt(Player player) { - if (exempt.remove(player.getUniqueId())) { - NCPExemptionManager.unexempt(player, CheckType.ALL); - } - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatSpartan.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatSpartan.java deleted file mode 100644 index 456eedf..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anticheat/plugins/AnticheatSpartan.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.willfp.illusioner.integrations.anticheat.plugins; - -import com.willfp.illusioner.integrations.anticheat.AnticheatWrapper; -import me.vagdedes.spartan.api.PlayerViolationEvent; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -public class AnticheatSpartan implements AnticheatWrapper, Listener { - private final Set exempt = new HashSet<>(); - - @Override - public String getPluginName() { - return "Spartan"; - } - - @Override - public void exempt(Player player) { - this.exempt.add(player.getUniqueId()); - } - - @Override - public void unexempt(Player player) { - this.exempt.remove(player.getUniqueId()); - } - - @EventHandler(priority = EventPriority.LOWEST) - private void onViolate(PlayerViolationEvent event) { - if (!exempt.contains(event.getPlayer().getUniqueId())) { - return; - } - - event.setCancelled(true); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefManager.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefManager.java deleted file mode 100644 index a7c32f6..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefManager.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief; - -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -import java.util.HashSet; -import java.util.Set; - -public class AntigriefManager { - private static final Set antigriefs = new HashSet<>(); - - /** - * Register a new AntiGrief/Land Management integration - * - * @param antigrief The integration to register - */ - public static void register(AntigriefWrapper antigrief) { - antigriefs.add(antigrief); - } - - /** - * Can player break block - * - * @param player The player - * @param block The block - * @return If player can break block - */ - public static boolean canBreakBlock(Player player, Block block) { - return antigriefs.stream().allMatch(antigriefWrapper -> antigriefWrapper.canBreakBlock(player, block)); - } - - /** - * Can player create explosion at location - * - * @param player The player - * @param location The location - * @return If player can create explosion - */ - public static boolean canCreateExplosion(Player player, Location location) { - return antigriefs.stream().allMatch(antigriefWrapper -> antigriefWrapper.canCreateExplosion(player, location)); - } - - /** - * Can player place block - * - * @param player The player - * @param block The block - * @return If player can place block - */ - public static boolean canPlaceBlock(Player player, Block block) { - return antigriefs.stream().allMatch(antigriefWrapper -> antigriefWrapper.canPlaceBlock(player, block)); - } - - /** - * Can player injure living entity - * - * @param player The player - * @param victim The victim - * @return If player can injure - */ - public static boolean canInjure(Player player, LivingEntity victim) { - return antigriefs.stream().allMatch(antigriefWrapper -> antigriefWrapper.canInjure(player, victim)); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefWrapper.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefWrapper.java deleted file mode 100644 index b9f9b92..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/AntigriefWrapper.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief; - -import com.willfp.illusioner.integrations.Integration; -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -/** - * Interface for Antigrief integrations - */ -public interface AntigriefWrapper extends Integration { - /** - * Can player break block - * - * @param player The player - * @param block The block - * @return If player cna break block - */ - boolean canBreakBlock(Player player, Block block); - - /** - * Can player create explosion at location - * - * @param player The player - * @param location The location - * @return If player can create explosion - */ - boolean canCreateExplosion(Player player, Location location); - - /** - * Can player place block - * - * @param player The player - * @param block The block - * @return If player can place block - */ - boolean canPlaceBlock(Player player, Block block); - - /** - * Can player injure living entity - * - * @param player The player - * @param victim The victim - * @return If player can injure - */ - boolean canInjure(Player player, LivingEntity victim); -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefFactionsUUID.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefFactionsUUID.java deleted file mode 100644 index 8b2e1f2..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefFactionsUUID.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief.plugins; - -import com.massivecraft.factions.Board; -import com.massivecraft.factions.FLocation; -import com.massivecraft.factions.FPlayer; -import com.massivecraft.factions.FPlayers; -import com.massivecraft.factions.Faction; -import com.massivecraft.factions.perms.PermissibleAction; -import com.willfp.illusioner.integrations.antigrief.AntigriefWrapper; -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -public class AntigriefFactionsUUID implements AntigriefWrapper { - @Override - public boolean canBreakBlock(Player player, Block block) { - FPlayer fplayer = FPlayers.getInstance().getByPlayer(player); - FLocation flocation = new FLocation(block.getLocation()); - Faction faction = Board.getInstance().getFactionAt(flocation); - - if (!faction.hasAccess(fplayer, PermissibleAction.DESTROY)) { - return fplayer.isAdminBypassing(); - } - return true; - } - - @Override - public boolean canCreateExplosion(Player player, Location location) { - FPlayer fplayer = FPlayers.getInstance().getByPlayer(player); - FLocation flocation = new FLocation(location); - Faction faction = Board.getInstance().getFactionAt(flocation); - - return !faction.noExplosionsInTerritory(); - } - - @Override - public boolean canPlaceBlock(Player player, Block block) { - FPlayer fplayer = FPlayers.getInstance().getByPlayer(player); - FLocation flocation = new FLocation(block.getLocation()); - Faction faction = Board.getInstance().getFactionAt(flocation); - - if (!faction.hasAccess(fplayer, PermissibleAction.BUILD)) { - return fplayer.isAdminBypassing(); - } - return true; - } - - @Override - public boolean canInjure(Player player, LivingEntity victim) { - FPlayer fplayer = FPlayers.getInstance().getByPlayer(player); - FLocation flocation = new FLocation(victim.getLocation()); - Faction faction = Board.getInstance().getFactionAt(flocation); - - if(victim instanceof Player) { - if (faction.isPeaceful()) { - return fplayer.isAdminBypassing(); - } - } else { - if (faction.hasAccess(fplayer, PermissibleAction.DESTROY)) { - return fplayer.isAdminBypassing(); - } - } - return true; - } - - @Override - public String getPluginName() { - return "FactionsUUID"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefGriefPrevention.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefGriefPrevention.java deleted file mode 100644 index 21d8d0a..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefGriefPrevention.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief.plugins; - -import com.willfp.illusioner.integrations.antigrief.AntigriefWrapper; -import me.ryanhamshire.GriefPrevention.Claim; -import me.ryanhamshire.GriefPrevention.GriefPrevention; -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -public class AntigriefGriefPrevention implements AntigriefWrapper { - @Override - public boolean canBreakBlock(Player player, Block block) { - Claim claim = GriefPrevention.instance.dataStore.getClaimAt(block.getLocation(), false, null); - if (claim != null) { - return claim.allowBreak(player, block.getType()) == null; - } - return true; - } - - @Override - public boolean canCreateExplosion(Player player, Location location) { - Claim claim = GriefPrevention.instance.dataStore.getClaimAt(location, false, null); - if (claim != null) { - return claim.areExplosivesAllowed; - } - return true; - } - - @Override - public boolean canPlaceBlock(Player player, Block block) { - Claim claim = GriefPrevention.instance.dataStore.getClaimAt(block.getLocation(), false, null); - if (claim != null) { - return claim.allowBuild(player, block.getType()) == null; - } - return true; - } - - @Override - public boolean canInjure(Player player, LivingEntity victim) { - Claim claim = GriefPrevention.instance.dataStore.getClaimAt(victim.getLocation(), false, null); - if(victim instanceof Player) { - return claim == null; - } else { - if (claim != null && claim.ownerID != null) { - return claim.ownerID.equals(player.getUniqueId()); - } - return true; - } - } - - @Override - public String getPluginName() { - return "GriefPrevention"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefKingdoms.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefKingdoms.java deleted file mode 100644 index e00c379..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefKingdoms.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief.plugins; - -import com.willfp.illusioner.integrations.antigrief.AntigriefWrapper; -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.block.BlockPlaceEvent; -import org.bukkit.inventory.EquipmentSlot; -import org.kingdoms.constants.kingdom.Kingdom; -import org.kingdoms.constants.land.Land; -import org.kingdoms.managers.PvPManager; -import org.kingdoms.managers.land.LandManager; - -public class AntigriefKingdoms implements AntigriefWrapper { - @Override - public boolean canBreakBlock(Player player, Block block) { - BlockBreakEvent event = new BlockBreakEvent(block, player); - LandManager.onBreak(event); - return !event.isCancelled(); - } - - @Override - public boolean canCreateExplosion(Player player, Location location) { - Land land = Land.getLand(location); - if (land == null) return true; - if(!land.isClaimed()) return true; - - Kingdom kingdom = land.getKingdom(); - return kingdom.isMember(player); - } - - @Override - public boolean canPlaceBlock(Player player, Block block) { - Block placedOn = block.getRelative(0, -1, 0); - BlockPlaceEvent event = new BlockPlaceEvent(block, block.getState(), placedOn, player.getInventory().getItemInMainHand(), player, true, EquipmentSlot.HAND); - LandManager.onPlace(event); - return !event.isCancelled(); - } - - @Override - public boolean canInjure(Player player, LivingEntity victim) { - if(victim instanceof Player) { - return PvPManager.canFight(player, (Player) victim); - } else { - Land land = Land.getLand(victim.getLocation()); - if (land == null) return true; - if(!land.isClaimed()) return true; - - Kingdom kingdom = land.getKingdom(); - return kingdom.isMember(player); - } - } - - @Override - public String getPluginName() { - return "Kingdoms"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefLands.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefLands.java deleted file mode 100644 index 0259e24..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefLands.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief.plugins; - -import com.willfp.illusioner.IllusionerPlugin; -import com.willfp.illusioner.integrations.antigrief.AntigriefWrapper; -import me.angeschossen.lands.api.integration.LandsIntegration; -import me.angeschossen.lands.api.land.Area; -import me.angeschossen.lands.api.role.enums.RoleSetting; -import org.bukkit.Location; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -public class AntigriefLands implements AntigriefWrapper { - @Override - public boolean canBreakBlock(Player player, Block block) { - LandsIntegration landsIntegration = new LandsIntegration(IllusionerPlugin.getInstance()); - Area area = landsIntegration.getAreaByLoc(block.getLocation()); - if (area != null) { - return area.canSetting(player, RoleSetting.BLOCK_BREAK, false); - } - return true; - } - - @Override - public boolean canCreateExplosion(Player player, Location location) { - LandsIntegration landsIntegration = new LandsIntegration(IllusionerPlugin.getInstance()); - Area area = landsIntegration.getAreaByLoc(location); - if (area != null) { - return area.canSetting(player, RoleSetting.BLOCK_IGNITE, false); - } - return true; - } - - @Override - public boolean canPlaceBlock(Player player, Block block) { - LandsIntegration landsIntegration = new LandsIntegration(IllusionerPlugin.getInstance()); - Area area = landsIntegration.getAreaByLoc(block.getLocation()); - if (area != null) { - return area.canSetting(player, RoleSetting.BLOCK_PLACE, false); - } - return true; - } - - @Override - public boolean canInjure(Player player, LivingEntity victim) { - LandsIntegration landsIntegration = new LandsIntegration(IllusionerPlugin.getInstance()); - Area area = landsIntegration.getAreaByLoc(victim.getLocation()); - if(victim instanceof Player) { - if (area != null) { - return area.canSetting(player, RoleSetting.ATTACK_PLAYER, false); - } - } else { - if (area != null) { - return area.canSetting(player, RoleSetting.ATTACK_ANIMAL, false); - } - } - return true; - } - - @Override - public String getPluginName() { - return "Lands"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefTowny.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefTowny.java deleted file mode 100644 index ce66567..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefTowny.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief.plugins; - -import com.palmergames.bukkit.towny.object.Town; -import com.palmergames.bukkit.towny.object.TownyPermission; -import com.palmergames.bukkit.towny.object.WorldCoord; -import com.palmergames.bukkit.towny.utils.PlayerCacheUtil; -import com.willfp.illusioner.integrations.antigrief.AntigriefWrapper; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -public class AntigriefTowny implements AntigriefWrapper { - @Override - public boolean canBreakBlock(Player player, Block block) { - return PlayerCacheUtil.getCachePermission(player, block.getLocation(), block.getType(), TownyPermission.ActionType.DESTROY); - } - - @Override - public boolean canCreateExplosion(Player player, Location location) { - return PlayerCacheUtil.getCachePermission(player, location, Material.TNT, TownyPermission.ActionType.ITEM_USE); - } - - @Override - public boolean canPlaceBlock(Player player, Block block) { - return PlayerCacheUtil.getCachePermission(player, block.getLocation(), block.getType(), TownyPermission.ActionType.BUILD); - } - - @Override - public boolean canInjure(Player player, LivingEntity victim) { - if(victim instanceof Player) { - try { - Town town = WorldCoord.parseWorldCoord(victim.getLocation()).getTownBlock().getTown(); - return town.isPVP(); - } catch (Exception ignored) {} - } else { - try { - Town town = WorldCoord.parseWorldCoord(victim.getLocation()).getTownBlock().getTown(); - return town.hasMobs(); - } catch (Exception ignored) {} - } - return true; - } - - @Override - public String getPluginName() { - return "Towny"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefWorldGuard.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefWorldGuard.java deleted file mode 100644 index 73ca351..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/antigrief/plugins/AntigriefWorldGuard.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.willfp.illusioner.integrations.antigrief.plugins; - -import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldguard.LocalPlayer; -import com.sk89q.worldguard.WorldGuard; -import com.sk89q.worldguard.bukkit.WorldGuardPlugin; -import com.sk89q.worldguard.protection.flags.Flags; -import com.sk89q.worldguard.protection.regions.RegionContainer; -import com.sk89q.worldguard.protection.regions.RegionQuery; -import com.willfp.illusioner.integrations.antigrief.AntigriefWrapper; -import org.apache.commons.lang.Validate; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.block.Block; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; - -public class AntigriefWorldGuard implements AntigriefWrapper { - @Override - public boolean canBreakBlock(Player player, Block block) { - LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player); - RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer(); - RegionQuery query = container.createQuery(); - - if (!query.testState(BukkitAdapter.adapt(block.getLocation()), localPlayer, Flags.BUILD)) { - return WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(localPlayer, BukkitAdapter.adapt(block.getWorld())); - } - return true; - } - - @Override - public boolean canCreateExplosion(Player player, Location location) { - LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player); - RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer(); - RegionQuery query = container.createQuery(); - World world = location.getWorld(); - Validate.notNull(world, "World cannot be null!"); - - if (!query.testState(BukkitAdapter.adapt(location), localPlayer, Flags.OTHER_EXPLOSION)) { - return WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(localPlayer, BukkitAdapter.adapt(world)); - } - return true; - } - - @Override - public boolean canPlaceBlock(Player player, Block block) { - LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player); - RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer(); - RegionQuery query = container.createQuery(); - - if (!query.testState(BukkitAdapter.adapt(block.getLocation()), localPlayer, Flags.BLOCK_PLACE)) { - return WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(localPlayer, BukkitAdapter.adapt(block.getWorld())); - } - return true; - } - - @Override - public boolean canInjure(Player player, LivingEntity victim) { - LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player); - RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer(); - RegionQuery query = container.createQuery(); - - if(victim instanceof Player) { - if (!query.testState(BukkitAdapter.adapt(victim.getLocation()), localPlayer, Flags.PVP)) { - return WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(localPlayer, BukkitAdapter.adapt(player.getWorld())); - } - } else { - if (!query.testState(BukkitAdapter.adapt(victim.getLocation()), localPlayer, Flags.DAMAGE_ANIMALS)) { - return WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(localPlayer, BukkitAdapter.adapt(player.getWorld())); - } - } - return true; - } - - @Override - public String getPluginName() { - return "WorldGuard"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIIntegration.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIIntegration.java deleted file mode 100644 index 077c41c..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIIntegration.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.willfp.illusioner.integrations.anvilgui; - -import com.willfp.illusioner.integrations.Integration; - -/** - * Interface for AnvilGUI integrations - */ -public interface AnvilGUIIntegration extends Integration { - /** - * Get if the NMS inventory is an instance of an AnvilGUI - * - * @param object The NMS inventory to check - * @return If the object is an AnvilGUI - * @see com.willfp.illusioner.nms.OpenInventory - */ - boolean isInstance(Object object); -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIManager.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIManager.java deleted file mode 100644 index 9af7046..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/AnvilGUIManager.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.willfp.illusioner.integrations.anvilgui; - -import com.willfp.illusioner.nms.OpenInventory; -import org.bukkit.entity.Player; - -import java.util.HashSet; -import java.util.Set; - -/** - * Utility class for interfacing with plugins that use WesJD's AnvilGUI library - */ -public class AnvilGUIManager { - private static final Set integrations = new HashSet<>(); - - /** - * Register a new AnvilGUI integration - * - * @param integration The integration to register - */ - public static void registerIntegration(AnvilGUIIntegration integration) { - integrations.add(integration); - } - - /** - * Get if a player's open inventory is an AnvilGUI - * - * @param player The player to check - * @return If the player's open inventory is an AnvilGUI - */ - public static boolean hasAnvilGUIOpen(Player player) { - if (integrations.isEmpty()) - return false; - return integrations.stream().anyMatch(integration -> integration.isInstance(OpenInventory.getOpenInventory(player))); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/plugins/AnvilGUIImpl.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/plugins/AnvilGUIImpl.java deleted file mode 100644 index 3922a9a..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/anvilgui/plugins/AnvilGUIImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.willfp.illusioner.integrations.anvilgui.plugins; - -import com.willfp.illusioner.IllusionerPlugin; -import com.willfp.illusioner.integrations.anvilgui.AnvilGUIIntegration; - -/** - * Concrete implementation of {@link AnvilGUIIntegration} - */ -public class AnvilGUIImpl implements AnvilGUIIntegration { - private static final String ANVIL_GUI_CLASS = "net.wesjd.anvilgui.version.Wrapper" + IllusionerPlugin.NMS_VERSION.substring(1) + "$AnvilContainer"; - - @Override - public boolean isInstance(Object object) { - return object.getClass().toString().equals(ANVIL_GUI_CLASS); - } - - @Override - public String getPluginName() { - return "AnvilGUI"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/drops/Drops.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/drops/Drops.java new file mode 100644 index 0000000..0a32649 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/integrations/drops/Drops.java @@ -0,0 +1,12 @@ +package com.willfp.illusioner.integrations.drops; + +import org.bukkit.Bukkit; +import org.bukkit.inventory.ItemStack; + +public class Drops { + public static boolean drop(ItemStack itemStack) { + if(Bukkit.getPluginManager().isPluginEnabled("EcoEnchants")) { + + } + } +} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoIntegration.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoIntegration.java deleted file mode 100644 index 3144712..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoIntegration.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.willfp.illusioner.integrations.mcmmo; - -import com.willfp.illusioner.integrations.Integration; -import org.bukkit.event.Event; - -/** - * Interface for mcMMO integrations - */ -public interface McmmoIntegration extends Integration { - /** - * @see McmmoManager#isFake(Event) - */ - boolean isFake(Event event); -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoManager.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoManager.java deleted file mode 100644 index a4d64ab..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/McmmoManager.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.willfp.illusioner.integrations.mcmmo; - -import com.willfp.illusioner.util.ClassUtils; -import org.bukkit.event.Event; - -import java.util.HashSet; -import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; - -/** - * Utility class for interfacing with mcMMO - */ -public class McmmoManager { - private static final Set integrations = new HashSet<>(); - - /** - * Register a new mcMMO integration - * - * @param integration The integration to register - */ - public static void registerIntegration(McmmoIntegration integration) { - if(!ClassUtils.exists("com.gmail.nossr50.events.fake.FakeEvent")) - return; - integrations.add(integration); - } - - /** - * Get if an event is fake - * - * @param event The event to check - * @return If the event is fake - */ - public static boolean isFake(Event event) { - AtomicBoolean isFake = new AtomicBoolean(false); - integrations.forEach(integration -> { - if (integration.isFake(event)) isFake.set(true); - }); - - return isFake.get(); - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/plugins/McmmoIntegrationImpl.java b/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/plugins/McmmoIntegrationImpl.java deleted file mode 100644 index c04f2db..0000000 --- a/Plugin/src/main/java/com/willfp/illusioner/integrations/mcmmo/plugins/McmmoIntegrationImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.willfp.illusioner.integrations.mcmmo.plugins; - -import com.gmail.nossr50.events.fake.FakeEvent; -import com.willfp.illusioner.integrations.mcmmo.McmmoIntegration; -import org.bukkit.event.Event; - -/** - * Concrete implementation of {@link McmmoIntegration} - */ -public class McmmoIntegrationImpl implements McmmoIntegration { - @Override - public boolean isFake(Event event) { - return event instanceof FakeEvent; - } - - @Override - public String getPluginName() { - return "mcMMO"; - } -} diff --git a/Plugin/src/main/java/com/willfp/illusioner/nms/NMSIllusioner.java b/Plugin/src/main/java/com/willfp/illusioner/nms/NMSIllusioner.java index 1475d7f..fb81cfd 100644 --- a/Plugin/src/main/java/com/willfp/illusioner/nms/NMSIllusioner.java +++ b/Plugin/src/main/java/com/willfp/illusioner/nms/NMSIllusioner.java @@ -32,10 +32,11 @@ public class NMSIllusioner { * @param location The location to spawn it at * @param maxHealth The max health for the illusioner to have * @param attackDamage The attack damage for the illusioner + * @param name The name of the illusioner * @return The illusioner */ - public static EntityIllusionerWrapper spawn(Location location, double maxHealth, double attackDamage) { + public static EntityIllusionerWrapper spawn(Location location, double maxHealth, double attackDamage, String name) { assert illusionerWrapper != null; - return illusionerWrapper.spawn(location, maxHealth, attackDamage); + return illusionerWrapper.spawn(location, maxHealth, attackDamage, name); } } diff --git a/Plugin/src/main/java/com/willfp/illusioner/util/internal/Loader.java b/Plugin/src/main/java/com/willfp/illusioner/util/internal/Loader.java index 7ab1ae4..d90f8e7 100644 --- a/Plugin/src/main/java/com/willfp/illusioner/util/internal/Loader.java +++ b/Plugin/src/main/java/com/willfp/illusioner/util/internal/Loader.java @@ -8,25 +8,9 @@ import com.willfp.illusioner.events.armorequip.ArmorListener; import com.willfp.illusioner.events.armorequip.DispenserArmorListener; import com.willfp.illusioner.events.entitydeathbyentity.EntityDeathByEntityListeners; import com.willfp.illusioner.events.naturalexpgainevent.NaturalExpGainListeners; -import com.willfp.illusioner.illusioner.AttackListeners; -import com.willfp.illusioner.illusioner.DeathListeners; -import com.willfp.illusioner.illusioner.SpawnListeners; -import com.willfp.illusioner.integrations.anticheat.AnticheatManager; -import com.willfp.illusioner.integrations.anticheat.plugins.AnticheatAAC; -import com.willfp.illusioner.integrations.anticheat.plugins.AnticheatMatrix; -import com.willfp.illusioner.integrations.anticheat.plugins.AnticheatNCP; -import com.willfp.illusioner.integrations.anticheat.plugins.AnticheatSpartan; -import com.willfp.illusioner.integrations.antigrief.AntigriefManager; -import com.willfp.illusioner.integrations.antigrief.plugins.AntigriefFactionsUUID; -import com.willfp.illusioner.integrations.antigrief.plugins.AntigriefGriefPrevention; -import com.willfp.illusioner.integrations.antigrief.plugins.AntigriefKingdoms; -import com.willfp.illusioner.integrations.antigrief.plugins.AntigriefLands; -import com.willfp.illusioner.integrations.antigrief.plugins.AntigriefTowny; -import com.willfp.illusioner.integrations.antigrief.plugins.AntigriefWorldGuard; -import com.willfp.illusioner.integrations.anvilgui.AnvilGUIManager; -import com.willfp.illusioner.integrations.anvilgui.plugins.AnvilGUIImpl; -import com.willfp.illusioner.integrations.mcmmo.McmmoManager; -import com.willfp.illusioner.integrations.mcmmo.plugins.McmmoIntegrationImpl; +import com.willfp.illusioner.illusioner.listeners.AttackListeners; +import com.willfp.illusioner.illusioner.listeners.DeathListeners; +import com.willfp.illusioner.illusioner.listeners.SpawnListeners; import com.willfp.illusioner.integrations.placeholder.PlaceholderManager; import com.willfp.illusioner.integrations.placeholder.plugins.PlaceholderIntegrationPAPI; import com.willfp.illusioner.nms.BlockBreak; @@ -142,23 +126,8 @@ public class Loader { Logger.info("Loading Integrations..."); final HashMap integrations = new HashMap() {{ - // AntiGrief - put("WorldGuard", () -> AntigriefManager.register(new AntigriefWorldGuard())); - put("GriefPrevention", () -> AntigriefManager.register(new AntigriefGriefPrevention())); - put("FactionsUUID", () -> AntigriefManager.register(new AntigriefFactionsUUID())); - put("Towny", () -> AntigriefManager.register(new AntigriefTowny())); - put("Lands", () -> AntigriefManager.register(new AntigriefLands())); - put("Kingdoms", () -> AntigriefManager.register(new AntigriefKingdoms())); - - // AntiCheat - put("AAC", () -> AnticheatManager.register(new AnticheatAAC())); - put("Matrix", () -> AnticheatManager.register(new AnticheatMatrix())); - put("NoCheatPlus", () -> AnticheatManager.register(new AnticheatNCP())); - put("Spartan", () -> AnticheatManager.register(new AnticheatSpartan())); - // MISC put("PlaceholderAPI", () -> PlaceholderManager.addIntegration(new PlaceholderIntegrationPAPI())); - put("mcMMO", () -> McmmoManager.registerIntegration(new McmmoIntegrationImpl())); }}; Set enabledPlugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toSet()); @@ -176,7 +145,6 @@ public class Loader { })); Prerequisite.update(); - AnvilGUIManager.registerIntegration(new AnvilGUIImpl()); // No direct lib, can always register Logger.info(""); diff --git a/Plugin/src/main/java/com/willfp/illusioner/util/internal/OptionedSound.java b/Plugin/src/main/java/com/willfp/illusioner/util/internal/OptionedSound.java new file mode 100644 index 0000000..b907813 --- /dev/null +++ b/Plugin/src/main/java/com/willfp/illusioner/util/internal/OptionedSound.java @@ -0,0 +1,33 @@ +package com.willfp.illusioner.util.internal; + +import org.bukkit.Sound; + +public class OptionedSound { + private final Sound sound; + private final float volume; + private final float pitch; + private final boolean broadcast; + + public OptionedSound(Sound sound, float volume, float pitch, boolean broadcast) { + this.sound = sound; + this.volume = volume; + this.pitch = pitch; + this.broadcast = broadcast; + } + + public Sound getSound() { + return sound; + } + + public float getVolume() { + return volume; + } + + public float getPitch() { + return pitch; + } + + public boolean isBroadcast() { + return broadcast; + } +} diff --git a/Plugin/src/main/resources/plugin.yml b/Plugin/src/main/resources/plugin.yml index 949591d..86b9e13 100644 --- a/Plugin/src/main/resources/plugin.yml +++ b/Plugin/src/main/resources/plugin.yml @@ -6,18 +6,7 @@ authors: [Auxilor] website: willfp.com load: STARTUP softdepend: - - WorldGuard - - GriefPrevention - - Towny - - FactionsUUID - - Lands - - Kingdoms - - NoCheatPlus - - AAC - - Matrix - - Spartan - PlaceholderAPI - - mcMMO commands: ilreload: diff --git a/lib/SpartanAPI.jar b/lib/SpartanAPI.jar deleted file mode 100644 index 1f2d578a14103df362628c2d461c260fda90635f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15405 zcmb7r1yEhvk~YDD99)9Cy9Jlv?wX(ncMlFBSkU0^?(XjH5L^!g3GM{V5AV)Qa__w4 z&EHk0YFC}ry_fawZ}sX=K^g)Q9SjBr2CUozMG@>5fdhjCv$cG0VrI?YYGwI21O`SQ z)(O|ege-FW@m{!%=!Ixx3i`!FGL@U|5;+2!<##h{c(+t zXrIvPGR;?SWuQavi-nXmx!7sC0psy@rdL7-3;q_@UHV26{KInh?K;q`9F0v?dhlRGypg-Fc>hf z=6?(T;^|*2qbG&mH30n8zzJw#Xk=*Q@Q0S@|7hu83$%9xTK`Mqui5+O%SnEtp=4xY z=HO^#&tPB)bZ`h$SyDn1MCMBd!|f6x@);6k@Im&e8j^(+A%cVw&Jd~WIRm2R#eJ;6 zb*2PqUeJmZD|nnh+>;m6xjXs#pzn4&$zNY29!>LAuYK@(fYt+8DE3S$hfpksM(u`W zA=Q)YhU%iva3b&kHDusUCgZ!_u|AFy-~RdHikJn>3fc!Rjsw z2mdPCF`7nFUWC*{PwTkE+R^$(6F1RqDdXhv26Em(Z7Ec{gBtuddmLoL$E8*JTY2_va1-FVfDg6muT!%?t3}RC*u6z#yGSAQAu%h9&?uKFx>Nx$I%pP$05LPmn1#oqS_=McNIG8NMIbq@6YAI5E#^s z%37}nS#H-ZGmJ|&y_@2q&iaPl3#E(VGX`)eV@ZBn6xkYoQHm;3*z|}Z6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