mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-25 18:09:20 +00:00
2.0-PRE-7-HOTFIX
This commit is contained in:
@@ -27,7 +27,10 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ArmorStandManager {
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
package net.momirealms.customnameplates.nameplates;
|
||||
|
||||
import net.momirealms.customnameplates.font.*;
|
||||
import net.momirealms.customnameplates.font.FontOffset;
|
||||
import net.momirealms.customnameplates.font.FontUtil;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class NameplateUtil {
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.momirealms.customnameplates.ConfigManager;
|
||||
import net.momirealms.customnameplates.hook.TABTeamHook;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ package net.momirealms.customnameplates.nameplates.listener;
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.events.ListenerPriority;
|
||||
import com.comphenix.protocol.events.PacketAdapter;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
import net.momirealms.customnameplates.CustomNameplates;
|
||||
import net.momirealms.customnameplates.nameplates.mode.PacketsHandler;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) <2022> <XiaoMoMi>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.momirealms.customnameplates.nameplates.mode;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) <2022> <XiaoMoMi>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.momirealms.customnameplates.nameplates.mode;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
package net.momirealms.customnameplates.nameplates.mode;
|
||||
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import net.momirealms.customnameplates.ConfigManager;
|
||||
import net.momirealms.customnameplates.CustomNameplates;
|
||||
import net.momirealms.customnameplates.Function;
|
||||
import net.momirealms.customnameplates.nameplates.listener.BukkitListener;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) <2022> <XiaoMoMi>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.momirealms.customnameplates.nameplates.mode.bubbles;
|
||||
|
||||
import net.momirealms.customnameplates.CustomNameplates;
|
||||
|
||||
@@ -21,10 +21,10 @@ import com.comphenix.protocol.events.PacketContainer;
|
||||
import net.momirealms.customnameplates.ConfigManager;
|
||||
import net.momirealms.customnameplates.CustomNameplates;
|
||||
import net.momirealms.customnameplates.nameplates.ArmorStandManager;
|
||||
import net.momirealms.customnameplates.nameplates.mode.PacketsHandler;
|
||||
import net.momirealms.customnameplates.nameplates.listener.EntityDestroyListener;
|
||||
import net.momirealms.customnameplates.nameplates.listener.EntityMountListener;
|
||||
import net.momirealms.customnameplates.nameplates.listener.EntitySpawnListener;
|
||||
import net.momirealms.customnameplates.nameplates.mode.PacketsHandler;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -93,7 +93,9 @@ public class RdPacketsHandler extends PacketsHandler {
|
||||
|
||||
@Override
|
||||
public void onEntityMount(PacketContainer packet) {
|
||||
int[] ids = ridingTag.getArmorStandManager(super.getPlayerFromMap(packet.getIntegers().read(0))).getArmorStandIDs();
|
||||
Player player = super.getPlayerFromMap(packet.getIntegers().read(0));
|
||||
if (player == null) return;
|
||||
int[] ids = ridingTag.getArmorStandManager(player).getArmorStandIDs();
|
||||
if (ids != null) {
|
||||
int[] old = packet.getIntegerArrays().read(0);
|
||||
int[] idArray = new int[ids.length + old.length];
|
||||
|
||||
@@ -106,7 +106,7 @@ public class RidingTag extends EntityTag {
|
||||
if (target == viewer) return;
|
||||
if (viewer.getWorld() != target.getWorld()) return;
|
||||
if (getDistance(target, viewer) < 48 && viewer.canSee(target)) {
|
||||
ArmorStandManager asm = (ArmorStandManager) getArmorStandManager(target);
|
||||
ArmorStandManager asm = getArmorStandManager(target);
|
||||
asm.spawn(viewer);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(CustomNameplates.instance, () -> {
|
||||
asm.mount(viewer);
|
||||
|
||||
@@ -19,10 +19,10 @@ package net.momirealms.customnameplates.nameplates.mode.tm;
|
||||
|
||||
import net.momirealms.customnameplates.ConfigManager;
|
||||
import net.momirealms.customnameplates.CustomNameplates;
|
||||
import net.momirealms.customnameplates.nameplates.TeamManager;
|
||||
import net.momirealms.customnameplates.nameplates.mode.NameplateManager;
|
||||
import net.momirealms.customnameplates.nameplates.NameplatesTeam;
|
||||
import net.momirealms.customnameplates.nameplates.TeamManager;
|
||||
import net.momirealms.customnameplates.nameplates.mode.EventListener;
|
||||
import net.momirealms.customnameplates.nameplates.mode.NameplateManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
public class VehicleChecker extends Function {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user