Skip to content

Commit

Permalink
Fix NoSuchMethodError on joinleave
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 11, 2024
1 parent 4dc0185 commit 2bf5ce9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void onPlayerJoinEvent(PlayerJoinEvent event) {
for (Player onlinePlayer : plugin.getServer().getOnlinePlayers()) {
final boolean showConnects;
PersistentDataContainer dataContainer = onlinePlayer.getPersistentDataContainer();
if (!dataContainer.has(NamespacedKeys.SHOW_CONNECTION_MSGS.key(), PersistentDataType.BOOLEAN)) {
if (!dataContainer.has(NamespacedKeys.SHOW_CONNECTION_MSGS.key())) {
showConnects = config.connectionMsgsAreOnByDefault;
} else {
showConnects = dataContainer.get(NamespacedKeys.SHOW_CONNECTION_MSGS.key(), PersistentDataType.BOOLEAN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void onPlayerJoinEvent(PlayerJoinEvent event) {
for (Player onlinePlayer : plugin.getServer().getOnlinePlayers()) {
final boolean showJoin;
PersistentDataContainer dataContainer = onlinePlayer.getPersistentDataContainer();
if (!dataContainer.has(NamespacedKeys.SHOW_CONNECTION_MSGS.key(), PersistentDataType.BOOLEAN)) {
if (!dataContainer.has(NamespacedKeys.SHOW_CONNECTION_MSGS.key())) {
showJoin = connectionMsgsOnByDefault;
} else {
showJoin = dataContainer.get(NamespacedKeys.SHOW_CONNECTION_MSGS.key(), PersistentDataType.BOOLEAN);
Expand Down Expand Up @@ -103,7 +103,7 @@ private void onPlayerLeaveEvent(PlayerQuitEvent event) {

final boolean showLeave;
PersistentDataContainer dataContainer = onlinePlayer.getPersistentDataContainer();
if (!dataContainer.has(NamespacedKeys.SHOW_CONNECTION_MSGS.key(), PersistentDataType.BOOLEAN)) {
if (!dataContainer.has(NamespacedKeys.SHOW_CONNECTION_MSGS.key())) {
showLeave = connectionMsgsOnByDefault;
} else {
showLeave = dataContainer.get(NamespacedKeys.SHOW_CONNECTION_MSGS.key(), PersistentDataType.BOOLEAN);
Expand Down

0 comments on commit 2bf5ce9

Please sign in to comment.