From 531812d80008fd2de346e3171b82d06d7899e7f6 Mon Sep 17 00:00:00 2001 From: BenCodez Date: Tue, 5 Nov 2024 07:31:24 -0600 Subject: [PATCH] Check if sever still exists on velocity --- .../votingplugin/bungee/velocity/VotingPluginVelocity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java index 39e8d03b5..96be1076b 100644 --- a/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java +++ b/VotingPlugin/src/com/bencodez/votingplugin/bungee/velocity/VotingPluginVelocity.java @@ -857,7 +857,9 @@ public void debug(String text) { data.getNode("Time").getLong(), data.getNode("Real").getBoolean(), data.getNode("Text").getString())); } - cachedVotes.put(server.getServer(serverToCheck).get(), vote); + if (server.getServer(serverToCheck).isPresent()) { + cachedVotes.put(server.getServer(serverToCheck).get(), vote); + } } } catch (Exception e) { e.printStackTrace();