Config build change to new ConfigBuilder
This commit is contained in:
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
public class OpCommand implements Listener {
|
||||
@EventHandler
|
||||
public void onOPServer(ServerCommandEvent event) {
|
||||
if (!OPWhitelist.enable.valueBoolean) return;
|
||||
if (!(boolean) OPWhitelist.VALUES.enable.getValue()) return;
|
||||
if ((event.getCommand().toLowerCase().startsWith("op ") || event.getCommand().toLowerCase().startsWith("minecraft:op "))) {
|
||||
switch (isNotOPWTL(event.getCommand())) {
|
||||
case mustOnline:
|
||||
@@ -39,7 +39,7 @@ public class OpCommand implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onOpPlayer(PlayerCommandPreprocessEvent event) {
|
||||
if (!OPWhitelist.enable.valueBoolean) return;
|
||||
if (!(boolean) OPWhitelist.VALUES.enable.getValue()) return;
|
||||
if ((event.getMessage().toLowerCase().startsWith("/op ") || event.getMessage().toLowerCase().startsWith("/minecraft:op "))) {
|
||||
switch (isNotOPWTL(event.getMessage())) {
|
||||
case mustOnline:
|
||||
@@ -59,7 +59,7 @@ public class OpCommand implements Listener {
|
||||
String arg = command.replace("op ", "");
|
||||
Player target = Bukkit.getPlayer(arg);
|
||||
|
||||
if (OPWhitelist.playerMustBeOnlineToOp.valueBoolean) {
|
||||
if ((boolean)OPWhitelist.VALUES.playerMustBeOnlineToOp.getValue()) {
|
||||
if (target == null) return OpCommandRequest.mustOnline;
|
||||
if (!opWhitelist(target.getName(), target.getUniqueId().toString())) return OpCommandRequest.notWhitelisted;
|
||||
}
|
||||
|
Reference in New Issue
Block a user