From 4aeed642b35a1b972f9248b7815dd263681ebd4e Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 13 Sep 2018 10:32:38 +0100 Subject: [PATCH] Website Link Reward (#645) --- .../core/common/block/DataLocationMap.java | 9 +- .../mineplex/core/gadget/GadgetManager.java | 2 + .../gadgets/wineffect/WinEffectLavaTrap.java | 2 +- .../gadgets/wineffect/WinEffectLogo.java | 185 ++++++++++++++++++ .../core/gadget/types/WinEffectGadget.java | 13 +- .../core/titles/tracks/TrackManager.java | 2 + .../titles/tracks/award/NewWebsiteTrack.java | 30 +++ .../core/website/WebsiteLinkManager.java | 120 ++++++++---- .../src/mineplex/clanshub/ClansHub.java | 2 +- .../Mineplex.Hub/src/mineplex/hub/Hub.java | 2 +- .../src/nautilus/game/arcade/Arcade.java | 2 +- 11 files changed, 318 insertions(+), 51 deletions(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLogo.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/award/NewWebsiteTrack.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/block/DataLocationMap.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/block/DataLocationMap.java index 147732edd..19049cd1a 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/block/DataLocationMap.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/block/DataLocationMap.java @@ -10,9 +10,8 @@ import org.bukkit.Location; public class DataLocationMap { - private EnumMap> _goldDataMap; - private EnumMap> _ironDataMap; - private EnumMap> _spongeDataMap; + + private final EnumMap> _goldDataMap, _ironDataMap, _spongeDataMap; public DataLocationMap() { @@ -61,7 +60,8 @@ public class DataLocationMap } } - public void addSpongeLocation(DyeColor color, Location location) { + public void addSpongeLocation(DyeColor color, Location location) + { if (_spongeDataMap.containsKey(color)) { _spongeDataMap.get(color).add(location); @@ -79,5 +79,4 @@ public class DataLocationMap List list = _spongeDataMap.get(color); return list == null ? Collections.emptyList() : list; } - } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 9b87aae13..4ee684cd5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -322,6 +322,7 @@ import mineplex.core.gadget.gadgets.wineffect.WinEffectFlames; import mineplex.core.gadget.gadgets.wineffect.WinEffectHalloween; import mineplex.core.gadget.gadgets.wineffect.WinEffectLavaTrap; import mineplex.core.gadget.gadgets.wineffect.WinEffectLightningStrike; +import mineplex.core.gadget.gadgets.wineffect.WinEffectLogo; import mineplex.core.gadget.gadgets.wineffect.WinEffectLoveIsABattlefield; import mineplex.core.gadget.gadgets.wineffect.WinEffectMrPunchMan; import mineplex.core.gadget.gadgets.wineffect.WinEffectPartyAnimal; @@ -818,6 +819,7 @@ public class GadgetManager extends MiniPlugin //Win Effects addGadget(new WinEffectPodium(this)); + addGadget(new WinEffectLogo(this)); addGadget(new WinEffectMrPunchMan(this)); addGadget(new WinEffectFlames(this)); addGadget(new WinEffectSnowTrails(this)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLavaTrap.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLavaTrap.java index 21dae8773..806c3ca1a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLavaTrap.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLavaTrap.java @@ -129,7 +129,7 @@ public class WinEffectLavaTrap extends WinEffectGadget getBaseLocation().getWorld().playSound(getBaseLocation(), Sound.DIG_STONE, 1, 1.5f); getBaseLocation().getWorld().playSound(getBaseLocation(), Sound.DIG_STONE, 1, 0.5f); - pasteScematic("LavaTrapPodium-part-2"); + pasteSchematic("LavaTrapPodium-part-2"); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLogo.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLogo.java new file mode 100644 index 000000000..dc44bf344 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLogo.java @@ -0,0 +1,185 @@ +package mineplex.core.gadget.gadgets.wineffect; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.bukkit.Color; +import org.bukkit.DyeColor; +import org.bukkit.FireworkEffect; +import org.bukkit.FireworkEffect.Type; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.block.Block; +import org.bukkit.entity.Entity; +import org.bukkit.entity.FallingBlock; +import org.bukkit.scheduler.BukkitRunnable; +import org.bukkit.util.Vector; + +import mineplex.core.blockrestore.BlockRestore; +import mineplex.core.common.block.schematic.SchematicData; +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilFirework; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTextBottom; +import mineplex.core.disguise.disguises.DisguisePlayer; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.WinEffectGadget; +import mineplex.core.gadget.util.CostConstants; + +public class WinEffectLogo extends WinEffectGadget +{ + + private DisguisePlayer _npc; + private SchematicData _data; + private Set _logoBlocks; + + public WinEffectLogo(GadgetManager manager) + { + super(manager, "Mineplex Logo", new String[] + { + C.cGray + "Awaken this ancient Mineplex Logo.", + C.blankLine, + C.cBlue + "Unlocked by linking your Mineplex", + C.cBlue + "forum account in-game", + }, CostConstants.NO_LORE, Material.WOOL, (byte) 1); + + _schematicName = "LogoEffect"; + } + + @Override + public void play() + { + Location location = getBaseLocation(); + location.setYaw(180); + BlockRestore restore = Manager.getBlockRestore(); + + Manager.runSyncLater(() -> + { + _npc = getNPC(getPlayer(), location, true); + _logoBlocks.forEach(restore::restore); + location.getWorld().playSound(location, Sound.EXPLODE, 2, 0.6F); + + List corners = _data.getDataLocationMap().getIronLocations(DyeColor.YELLOW); + Location start = corners.get(0), end = corners.get(1); + Vector direction = location.getDirection(); + + for (int i = 0; i < 14; i++) + { + Location fallingLocation = start.clone(); + fallingLocation.setX(UtilMath.rRange(end.getBlockX(), start.getBlockX())); + fallingLocation.setY(UtilMath.rRange(start.getBlockY() + 2, end.getBlockY())); + + FallingBlock block = start.getWorld().spawnFallingBlock(fallingLocation, Material.STONE, (byte) 0); + block.setDropItem(false); + block.setHurtEntities(false); + block.setVelocity(direction); + } + + UtilParticle.PlayParticleToAll(ParticleType.HUGE_EXPLOSION, getBaseLocation().add(3, 8, 0), 4, 4, 0, 0, 10, ViewDist.NORMAL); + + Manager.runSyncTimer(new BukkitRunnable() + { + int x = start.getBlockX(); + int i = 0; + + @Override + public void run() + { + if (!isRunning()) + { + cancel(); + return; + } + + if (i % 3 == 0) + { + UtilFirework.playFirework(UtilAlg.getRandomLocation(getBaseLocation().add(0, 13, 0), 10, 3, 10), FireworkEffect.builder() + .with(Type.BALL) + .withColor(Color.ORANGE) + .withFade(Color.BLACK) + .build()); + + Entity entity = _npc.getEntity().getBukkitEntity(); + _npc.sendHit(); + + if (UtilEnt.isGrounded(entity)) + { + entity.setVelocity(new Vector(0, 0.42, 0)); + } + } + + for (Block block : _logoBlocks) + { + if (block.getType() == Material.WOOL || block.getLocation().getBlockX() != x) + { + continue; + } + + restore.add(block, block.getTypeId(), (byte) 0, 240); + } + + if (--x < end.getBlockX()) + { + x = start.getBlockX(); + } + + if (i % 10 == 0) + { + UtilTextBottom.display(C.cGray + "Unlock " + C.cYellowB + "THIS" + C.cGray + " Win Effect by signing up on " + C.cGoldB + "MINEPLEX.COM", UtilServer.getPlayers()); + } + + i++; + } + }, 10, 3); + }, 60); + } + + @Override + public void buildWinnerRoom() + { + _data = pasteSchematic(_schematicName); + + List corners = _data.getDataLocationMap().getIronLocations(DyeColor.YELLOW); + corners.sort((o1, o2) -> o2.getBlockX() - o1.getBlockX()); + + BlockRestore restore = Manager.getBlockRestore(); + _logoBlocks = new HashSet<>(); + + for (Block block : UtilBlock.getInBoundingBox(corners.get(0), corners.get(1))) + { + Material type = block.getType(); + + if (type == Material.WOOL || type == Material.STAINED_CLAY || type == Material.STAINED_GLASS) + { + restore.add(block, Material.STONE.getId(), (byte) 0, Integer.MAX_VALUE); + _logoBlocks.add(block); + } + } + } + + @Override + public void teleport() + { + teleport(_data.getDataLocationMap().getGoldLocations(DyeColor.GREEN).get(0)); + } + + @Override + public void finish() + { + Manager.getDisguiseManager().undisguise(_npc); + _npc = null; + _data = null; + _logoBlocks.clear(); + _logoBlocks = null; + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/WinEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/WinEffectGadget.java index 75fc856cb..95a55cf1f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/WinEffectGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/WinEffectGadget.java @@ -30,6 +30,7 @@ import com.mojang.authlib.GameProfile; import mineplex.core.Managers; import mineplex.core.account.permissions.PermissionGroup; import mineplex.core.common.block.schematic.Schematic; +import mineplex.core.common.block.schematic.SchematicData; import mineplex.core.common.block.schematic.UtilSchematic; import mineplex.core.common.skin.SkinData; import mineplex.core.common.util.C; @@ -317,7 +318,7 @@ public abstract class WinEffectGadget extends Gadget */ public void buildWinnerRoom() { - pasteScematic(_schematicName); + pasteSchematic(_schematicName); } /** @@ -390,14 +391,18 @@ public abstract class WinEffectGadget extends Gadget * in the server root directory * @return Returns the schematic after pasting it. Will return null if any errors ocured. */ - public Schematic pasteScematic(String schematicName) + public SchematicData pasteSchematic(String schematicName) { try { Schematic schematic = UtilSchematic.loadSchematic(new File("../../update/schematic/" + schematicName + ".schematic")); + if (schematic != null) - schematic.paste(getBaseLocation(), false, true); - return schematic; + { + return schematic.paste(getBaseLocation(), false, true); + } + + return null; } catch (IOException e) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/TrackManager.java b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/TrackManager.java index 3e6de13ec..e55b853a3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/TrackManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/TrackManager.java @@ -32,6 +32,7 @@ import mineplex.core.titles.tracks.award.FiveYearTrack; import mineplex.core.titles.tracks.award.MapSub2018Track; import mineplex.core.titles.tracks.award.Minestrike2017Track; import mineplex.core.titles.tracks.award.NewHub2018Track; +import mineplex.core.titles.tracks.award.NewWebsiteTrack; import mineplex.core.titles.tracks.custom.DongerTrack; import mineplex.core.titles.tracks.custom.EarlyBirdTrack; import mineplex.core.titles.tracks.custom.HappyGaryTrack; @@ -133,6 +134,7 @@ public class TrackManager extends MiniPlugin registerTrack(new NewHub2018Track()); registerTrack(new MapSub2018Track()); registerTrack(new FiveYearTrack()); + registerTrack(new NewWebsiteTrack()); // Staff tracks registerTrack(new BuilderTrack()); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/award/NewWebsiteTrack.java b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/award/NewWebsiteTrack.java new file mode 100644 index 000000000..288250204 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/award/NewWebsiteTrack.java @@ -0,0 +1,30 @@ +package mineplex.core.titles.tracks.award; + +import net.md_5.bungee.api.ChatColor; + +import mineplex.core.titles.tracks.ItemizedTrack; +import mineplex.core.titles.tracks.TrackFormat; +import mineplex.core.titles.tracks.TrackTier; + +public class NewWebsiteTrack extends ItemizedTrack +{ + + public NewWebsiteTrack() + { + super( + "new-website", + ChatColor.GOLD, + "Verified", + "Verified Player", + "This track is awarded to players who have linked their Mineplex forum account in-game.", + true); + + getRequirements() + .addTier(new TrackTier( + "Verified " + ChatColor.WHITE + ChatColor.BOLD + "✓", + null, + this::owns, + new TrackFormat(ChatColor.GOLD, ChatColor.YELLOW) + )); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/website/WebsiteLinkManager.java b/Plugins/Mineplex.Core/src/mineplex/core/website/WebsiteLinkManager.java index 9e3dc5e68..ed19f5729 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/website/WebsiteLinkManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/website/WebsiteLinkManager.java @@ -4,7 +4,6 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.Authenticator; -import java.net.MalformedURLException; import java.net.URL; import java.sql.Connection; import java.sql.PreparedStatement; @@ -29,7 +28,6 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.plugin.java.JavaPlugin; import com.google.common.collect.Sets; import com.google.gson.JsonElement; @@ -37,21 +35,32 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; +import mineplex.core.Managers; import mineplex.core.MiniDbClientPlugin; -import mineplex.core.account.CoreClientManager; +import mineplex.core.ReflectivelyCreateMiniPlugin; import mineplex.core.account.event.GroupAddEvent; import mineplex.core.account.event.GroupRemoveEvent; import mineplex.core.account.event.PrimaryGroupUpdateEvent; import mineplex.core.account.permissions.Permission; import mineplex.core.account.permissions.PermissionGroup; +import mineplex.core.common.currency.GlobalCurrency; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; +import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.wineffect.WinEffectLogo; import mineplex.core.powerplayclub.PPCDataRequestEvent; import mineplex.core.powerplayclub.PowerPlayData; import mineplex.core.powerplayclub.SubscriptionAddEvent; +import mineplex.core.server.util.TransactionResponse; +import mineplex.core.titles.tracks.Track; +import mineplex.core.titles.tracks.TrackManager; +import mineplex.core.titles.tracks.TrackManager.TrackGiveResult; +import mineplex.core.titles.tracks.award.NewWebsiteTrack; import mineplex.serverdata.database.DBPool; +@ReflectivelyCreateMiniPlugin public class WebsiteLinkManager extends MiniDbClientPlugin { public enum Perm implements Permission @@ -60,15 +69,15 @@ public class WebsiteLinkManager extends MiniDbClientPlugin UNLINK_COMMAND, } - private final JsonParser PARSER = new JsonParser(); - private final String API_URL = "https://xen.mineplex.com/api.php"; - private final String API_KEY = "dd412425-edb0-477c-abee-2d0b507c59ef"; - private final int POWER_PLAY_TAG_ID = 17; - private final int LINKED_TAG_ID = 91; + private static final JsonParser PARSER = new JsonParser(); + private static final String API_URL = "https://xen.mineplex.com/api.php"; + private static final String API_KEY = "dd412425-edb0-477c-abee-2d0b507c59ef"; + private static final int POWER_PLAY_TAG_ID = 17; + private static final int LINKED_TAG_ID = 91; - public WebsiteLinkManager(JavaPlugin plugin, CoreClientManager clientManager) + private WebsiteLinkManager() { - super("Website Link", plugin, clientManager); + super("Website Link"); addCommand(new LinkCommand(this)); addCommand(new UnlinkCommand(this)); @@ -242,13 +251,13 @@ public class WebsiteLinkManager extends MiniDbClientPlugin adding.add(91); if (group.getForumId() != -1) { - adding.add(Integer.valueOf(group.getForumId())); + adding.add(group.getForumId()); } for (PermissionGroup addit : additional) { if (addit.getForumId() != -1) { - adding.add(Integer.valueOf(addit.getForumId())); + adding.add(addit.getForumId()); } } if (powerPlay) @@ -268,9 +277,49 @@ public class WebsiteLinkManager extends MiniDbClientPlugin UtilPlayer.message(player, F.main(getName(), "You have successfully linked your account!")); if (player.isOnline()) { - Get(player).LinkedForumId = data.user_id; - Get(player).LastSyncedPowerPlayStatus = powerPlay; - Get(player).Linked = true; + ForumUserData userData = Get(player); + + userData.LinkedForumId = data.user_id; + userData.LastSyncedPowerPlayStatus = powerPlay; + userData.Linked = true; + } + + TrackManager trackManager = Managers.get(TrackManager.class); + GadgetManager gadgetManager = Managers.get(GadgetManager.class); + DonationManager donationManager = Managers.get(DonationManager.class); + + if (trackManager != null) + { + Track track = trackManager.getTrack(NewWebsiteTrack.class); + + trackManager.unlockTrack(player, track, result -> + { + if (result == TrackGiveResult.SUCCESS) + { + player.sendMessage(F.main(getName(), "You unlocked the " + F.name(track.getLongName()) + " title.")); + } + else + { + player.sendMessage(F.main(getName(), "Was unable to reward you the " + F.name(track.getLongName()) + " title.")); + } + }); + } + + if (gadgetManager != null && donationManager != null) + { + String gadget = gadgetManager.getGadget(WinEffectLogo.class).getName(); + + donationManager.purchaseUnknownSalesPackage(player, gadgetManager.getGadget(WinEffectLogo.class).getName(), GlobalCurrency.TREASURE_SHARD, 0, true, response -> + { + if (response == TransactionResponse.Success) + { + player.sendMessage(F.main(getName(), "You unlocked the " + F.name(gadget) + " Win Effect.")); + } + else if (response != TransactionResponse.AlreadyOwns) + { + player.sendMessage(F.main(getName(), "Was unable to reward you the " + F.name(gadget) + " Win Effect.")); + } + }); } }, true, () -> UtilPlayer.message(player, F.main(getName(), "The link failed! Please try again!")), true); }); @@ -316,33 +365,33 @@ public class WebsiteLinkManager extends MiniDbClientPlugin return; } String callBase = "action=editUser&user=" + makeUsernameURL(data.username); - String groups = ""; + StringBuilder groups = new StringBuilder(); for (int groupId : data.secondary_group_ids) { if (!removing.contains(groupId) && !adding.contains(groupId)) { - groups += ("," + groupId); + groups.append(",").append(groupId); } } for (Integer groupId : adding) { - groups += ("," + groupId); + groups.append(",").append(groupId); } - if (!groups.isEmpty()) + if (groups.length() > 0) { - groups = groups.substring(1); + groups = new StringBuilder(groups.substring(1)); } - final String addGroups = groups; - groups = ""; + final String addGroups = groups.toString(); + groups = new StringBuilder(); for (int groupId : data.secondary_group_ids) { - groups += ("," + groupId); + groups.append(",").append(groupId); } - if (!groups.isEmpty()) + if (groups.length() > 0) { - groups = groups.substring(1); + groups = new StringBuilder(groups.substring(1)); } - final String remGroups = groups; + final String remGroups = groups.toString(); if (!remGroups.isEmpty()) { doAPICall(callBase + "&remove_groups=" + remGroups, err -> @@ -481,11 +530,11 @@ public class WebsiteLinkManager extends MiniDbClientPlugin StringBuilder result = new StringBuilder(); URL call = new URL(API_URL + "?hash=" + API_KEY + "&action=getUser&value=" + userId); BufferedReader br = new BufferedReader(new InputStreamReader(call.openStream())); - br.lines().forEach(line -> result.append(line)); + br.lines().forEach(result::append); String json = result.toString().trim(); - JsonObject response = null; + JsonObject response; try { response = PARSER.parse(json).getAsJsonObject(); @@ -534,11 +583,6 @@ public class WebsiteLinkManager extends MiniDbClientPlugin return; } } - catch (MalformedURLException e) - { - callback.accept(null); - e.printStackTrace(); - } catch (IOException e) { callback.accept(null); @@ -623,12 +667,12 @@ public class WebsiteLinkManager extends MiniDbClientPlugin sb.insert(0, "0"); } String reverse = sb.reverse().toString(); - Integer test = Integer.parseInt(reverse + reverse + reverse); + int test = Integer.parseInt(reverse + reverse + reverse); test += offset; - Integer input = Integer.parseInt(given); + int input = Integer.parseInt(given); - Integer abs = Math.abs(test - input); + int abs = Math.abs(test - input); // Bukkit.broadcastMessage("REVERSE: " + reverse); // Bukkit.broadcastMessage("TEST: " + test); @@ -853,7 +897,7 @@ public class WebsiteLinkManager extends MiniDbClientPlugin ResultSet rs = c.prepareStatement("SELECT userId FROM forumLink WHERE accountId=" + event.getAccountId() + ";").executeQuery(); if (rs.next()) { - Integer userId = rs.getInt(1); + int userId = rs.getInt(1); List add = new ArrayList<>(); add.add(17); refreshSiteTags(userId, new ArrayList<>(), add, false, () -> @@ -885,7 +929,7 @@ public class WebsiteLinkManager extends MiniDbClientPlugin { if (event.getPlayer().isOnline()) { - boolean ppc = false; + boolean ppc; PowerPlayData d = UtilServer.CallEvent(new PPCDataRequestEvent(event.getPlayer())).getData(); if (d != null) { diff --git a/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHub.java b/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHub.java index b029223ad..dcfc1fb9e 100644 --- a/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHub.java +++ b/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/ClansHub.java @@ -180,7 +180,7 @@ public class ClansHub extends JavaPlugin require(TrackManager.class); require(Titles.class); require(TwoFactorAuth.class); - new WebsiteLinkManager(this, clientManager); + require(WebsiteLinkManager.class); } @Override diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index e6cd45721..86c3b1c2a 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -202,7 +202,7 @@ public class Hub extends JavaPlugin implements IRelation require(Titles.class); require(TwoFactorAuth.class); require(TeamspeakManager.class); - new WebsiteLinkManager(this, clientManager); + require(WebsiteLinkManager.class); require(TwitchIntegrationFix.class); require(SoundNotifier.class); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index f739bf403..5c826d3dd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -207,7 +207,7 @@ public class Arcade extends JavaPlugin new FoodDupeFix(this); require(TwoFactorAuth.class); - new WebsiteLinkManager(this, clientManager); + require(WebsiteLinkManager.class); require(TwitchIntegrationFix.class); AprilFoolsManager.getInstance();