Made changes according to the comments in PR #9
/apply is now cancelled if the user didn't read the rules User is now not removed from the hasReadRules list until restartmaster
parent
8997133923
commit
efb8545e56
|
@ -79,7 +79,8 @@ public class CommandPreprocessListener implements Listener {
|
|||
hasReadRules.add(sender.getUniqueId().toString());
|
||||
}
|
||||
else if ("apply".equalsIgnoreCase(base)) {
|
||||
if(!hasReadRules.remove(sender.getUniqueId().toString())) {
|
||||
if(!hasReadRules.contains(sender.getUniqueId().toString())) {
|
||||
event.setCancelled(true);
|
||||
sender.spigot().sendMessage(new TextComponent(ChatColor.RED + "Make sure to check /rules before applying!"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue