Remove Dynamap

This commit is contained in:
NotAlexNoyle committed 2026-08-11 14:33:00 -04:00
1 parent 31bc05689d
commit 64d652a676
3 files changed
-91

No files matched your search

-3
View File
@@ -81,9 +81,6 @@ dependencies {
// TrailGUI (via JitPack).
compileOnly("com.github.SinnDevelopment:TrailGUI:37659dda03")
// Dynmap API (via JitPack).
compileOnly("com.github.webbukkit:dynmap-api:v3.1")
// Import MiniPlaceholders API.
compileOnly("io.github.miniplaceholders:miniplaceholders-api:2.2.3")
@@ -1,87 +0,0 @@
/*
* Copyright © 2015, Leon Mangler and the SuperVanish contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package de.myzelyam.supervanish.hooks;
import de.myzelyam.api.vanish.PlayerHideEvent;
import de.myzelyam.api.vanish.PlayerShowEvent;
import de.myzelyam.supervanish.SuperVanish;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.dynmap.DynmapAPI;
public class DynmapHook extends PluginHook {
private final boolean sendJoinLeave;
private final SuperVanish superVanish;
public DynmapHook(SuperVanish superVanish) {
super(superVanish);
this.superVanish = superVanish;
sendJoinLeave = superVanish.getSettings().getBoolean("HookOptions.DynmapSendJoinLeaveMessages")
&& !superVanish.getMessage("DynmapFakeJoin").equals("");
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onVanish(PlayerHideEvent e) {
Player p = e.getPlayer();
DynmapAPI dynmap = (DynmapAPI) plugin;
dynmap.setPlayerVisiblity(p, false);
if (sendJoinLeave)
dynmap.sendBroadcastToWeb("", superVanish.replacePlaceholders(superVanish.getMessage("DynmapFakeQuit"), p));
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onReappear(PlayerShowEvent e) {
Player p = e.getPlayer();
DynmapAPI dynmap = (DynmapAPI) plugin;
dynmap.setPlayerVisiblity(p, true);
if (sendJoinLeave)
dynmap.sendBroadcastToWeb("", superVanish.replacePlaceholders(superVanish.getMessage("DynmapFakeJoin"), p));
}
@EventHandler(priority = EventPriority.LOWEST)
public void onJoin(PlayerJoinEvent e) {
Player p = e.getPlayer();
DynmapAPI dynmap = (DynmapAPI) plugin;
if (superVanish.getVanishStateMgr().isVanished(p.getUniqueId())) {
dynmap.setPlayerVisiblity(p, false);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onQuit(PlayerQuitEvent e) {
Player p = e.getPlayer();
DynmapAPI dynmap = (DynmapAPI) plugin;
if (superVanish.getVanishStateMgr().isVanished(p.getUniqueId())) {
dynmap.setPlayerVisiblity(p, true);
}
}
}
@@ -32,7 +32,6 @@ public class PluginHookMgr implements Listener {
put("Essentials", EssentialsHook.class);
put("Citizens", CitizensHook.class);
put("Utilities-OG", MiniPlaceholdersHook.class);
put("dynmap", DynmapHook.class);
put("TrailGUI", TrailGUIHook.class);
put("OpenInv", OpenInvHook.class);
put("TAB-OG", TabOGHook.class);