mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Inspect Command Config
This commit is contained in:
parent
86f62fba0b
commit
7e047aed59
@ -9,6 +9,9 @@ public class ConfigCommands {
|
|||||||
@Setting(value = "Admin-Chat", comment = "Settings related to the admin chat command and chatting modes.")
|
@Setting(value = "Admin-Chat", comment = "Settings related to the admin chat command and chatting modes.")
|
||||||
private ConfigCommandsAdminChat adminChat = new ConfigCommandsAdminChat();
|
private ConfigCommandsAdminChat adminChat = new ConfigCommandsAdminChat();
|
||||||
|
|
||||||
|
@Setting(value = "Inspect", comment = "Settings related to the inspect command.")
|
||||||
|
private ConfigCommandsInspect inspect = new ConfigCommandsInspect();
|
||||||
|
|
||||||
public ConfigCommandsAdminChat getAdminChat() {
|
public ConfigCommandsAdminChat getAdminChat() {
|
||||||
return adminChat;
|
return adminChat;
|
||||||
}
|
}
|
||||||
@ -20,4 +23,20 @@ public class ConfigCommands {
|
|||||||
public boolean isUseDisplayNames() {
|
public boolean isUseDisplayNames() {
|
||||||
return getAdminChat().isUseDisplayNames();
|
return getAdminChat().isUseDisplayNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConfigCommandsInspect getInspect() {
|
||||||
|
return inspect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getInspectCommandMaxDistance() {
|
||||||
|
return getInspect().getInspectCommandMaxDistance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLimitInspectRange() {
|
||||||
|
return getInspect().isLimitInspectRange();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAllowInspectOnOfflinePlayers() {
|
||||||
|
return getInspect().isAllowInspectOnOfflinePlayers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.gmail.nossr50.config.hocon.commands;
|
||||||
|
|
||||||
|
import ninja.leaping.configurate.objectmapping.Setting;
|
||||||
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
|
@ConfigSerializable
|
||||||
|
public class ConfigCommandsInspect {
|
||||||
|
|
||||||
|
private static final double INSPECT_MAX_DISTANCE_DEFAULT = 30.0D;
|
||||||
|
private static final boolean LIMIT_INSPECT_RANGE_DEFAULT = false;
|
||||||
|
private static final boolean ALLOW_OFFLINE_INSPECTION_DEFAULT = true;
|
||||||
|
|
||||||
|
@Setting(value = "Inspect-Max-Distance", comment = "The maximum range at which players can inspect one another." +
|
||||||
|
"\nIs only used if limit inspect range is turned on." +
|
||||||
|
"\nDefault value: "+INSPECT_MAX_DISTANCE_DEFAULT)
|
||||||
|
private double inspectCommandMaxDistance = INSPECT_MAX_DISTANCE_DEFAULT;
|
||||||
|
|
||||||
|
@Setting(value = "Limit-Inspect-Range", comment = "Inspection is limited by the distance between players instead of always being usable.")
|
||||||
|
private boolean limitInspectRange = LIMIT_INSPECT_RANGE_DEFAULT;
|
||||||
|
|
||||||
|
@Setting(value = "Allow-Offline-Inspection", comment = "If set to true players will be able to look at the profiles of anyone on the server whether they are connected or not." +
|
||||||
|
"\nAdmins and the console can always check the profiles of offline players.")
|
||||||
|
private boolean allowInspectOnOfflinePlayers = ALLOW_OFFLINE_INSPECTION_DEFAULT;
|
||||||
|
|
||||||
|
public double getInspectCommandMaxDistance() {
|
||||||
|
return inspectCommandMaxDistance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLimitInspectRange() {
|
||||||
|
return limitInspectRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAllowInspectOnOfflinePlayers() {
|
||||||
|
return allowInspectOnOfflinePlayers;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user