Skip to content

Commit 403955a

Browse files
committed
🐛 negative entity id fixed.
1 parent 83b9168 commit 403955a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/com/azortis/protocolvanish/bukkit/visibility/VisibilityManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ private void clearVanishedFrom(Player player) {
251251
* @return The player instance, null if not found.
252252
*/
253253
public Player getPlayerFromEntityId(int entityId, World world) {
254+
if(entityId < 0)return null;
254255
Entity entity = ProtocolLibrary.getProtocolManager().getEntityFromID(world, entityId);
255256

256257
if (entity instanceof Player) {

src/main/resources/plugin.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ main: com.azortis.protocolvanish.bukkit.ProtocolVanish
44
version: 1.0
55
api-version: 1.15
66
loadbefore: [Essentials]
7-
depend: [ProtocolLib, PlaceholderAPI]
7+
depend: [ProtocolLib, PlaceholderAPI]
8+
softdepend: [Essentials]

0 commit comments

Comments
 (0)