From eb05b0504241a4b0d1a2464c76421e4c15c24ee0 Mon Sep 17 00:00:00 2001 From: Nathan Curran <30569566+Focusvity@users.noreply.github.com> Date: Tue, 16 Mar 2021 20:21:31 +1100 Subject: [PATCH] Fixed FS-93 - Players no longer need to relog, just need to be opped to get permissions. - Removed redundant PlayerJoinEvent code as it's already been executed (See RankManager class). --- .../totalfreedom/totalfreedommod/command/Command_deop.java | 1 + .../totalfreedommod/command/Command_deopall.java | 1 + .../totalfreedommod/permissions/PermissionManager.java | 6 ------ 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java index 73e18112..b9ec6b62 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deop.java @@ -40,6 +40,7 @@ public class Command_deop extends FreedomCommand matchedPlayerNames.add(player.getName()); player.setOp(false); player.sendMessage(FreedomCommand.YOU_ARE_NOT_OP); + plugin.rm.updateDisplay(player); } } } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java index c73e088a..4a8ec1f8 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_deopall.java @@ -20,6 +20,7 @@ public class Command_deopall extends FreedomCommand { player.setOp(false); player.sendMessage(FreedomCommand.YOU_ARE_NOT_OP); + plugin.rm.updateDisplay(player); } return true; diff --git a/src/main/java/me/totalfreedom/totalfreedommod/permissions/PermissionManager.java b/src/main/java/me/totalfreedom/totalfreedommod/permissions/PermissionManager.java index a3f23fb8..31a32655 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/permissions/PermissionManager.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/permissions/PermissionManager.java @@ -117,10 +117,4 @@ public class PermissionManager extends FreedomService setPermissions(player); } } - - @EventHandler(priority = EventPriority.NORMAL) - public void onPlayerJoin(PlayerJoinEvent event) - { - setPermissions(event.getPlayer()); - } } \ No newline at end of file