Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Switched to using userID as opposed to display name to prevent bypass…
Browse files Browse the repository at this point in the history
…ing security checks.
  • Loading branch information
Ashen-Design committed Mar 16, 2019
1 parent 6b60618 commit c4cc5d5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ private static void client(String token){
Bukkit.getScheduler().runTask(Main.getInstance(), () -> Bukkit.dispatchCommand(getConsoleSender(),"whitelist add " + args[1]));
Bukkit.getScheduler().runTask(Main.getInstance(), () -> Bukkit.dispatchCommand(getConsoleSender(), "whitelist reload"));

addUser(event.getMessageAuthor().getDisplayName(), args[1]);
System.out.println("Currently whitelisting: " + event.getMessageAuthor().getName());
addUser(event.getMessageAuthor().getIdAsString(), args[1]);
System.out.println("Currently whitelisting: " + event.getMessageAuthor().getId());

//Informs the user in Discord that the username has been whitelisted.
event.getChannel().sendMessage("Successfully whitelisted: " + args[1]);
Expand Down

0 comments on commit c4cc5d5

Please sign in to comment.