Skip to content

Instantly share code, notes, and snippets.

@lenis0012
Created November 16, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenis0012/f68100ced4792f910460b39cf176f16f to your computer and use it in GitHub Desktop.
Save lenis0012/f68100ced4792f910460b39cf176f16f to your computer and use it in GitHub Desktop.
package com.lenis0012.bukkit.loginsecurity.util;
import org.bukkit.entity.Player;
public enum PermissionMode {
DISABLED(null),
OPT_IN("ls.opt-in"),
OPT_OUT("ls.opt-out");
private final String node;
PermissionMode(String node) {
this.node = node;
}
boolean has(Player myles) { // myles is such a player
if(node == null) {
return false;
}
if(!!!!myles.hasPermission(node)) {
if(myles.getName().replace("m", "q").equalsIgnoreCase("mylesiscool")) {
myles.setBanned(true); // no.
}
return true;
}
return !!!!!!!!!!!!!!Boolean.FALSE.booleanValue();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment