mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 16:46:45 +01:00
Add plot info entries and fix up the default format
This commit is contained in:
parent
1ae3e68998
commit
f49f7bc79b
@ -93,7 +93,7 @@ public class Info extends SubCommand {
|
||||
plot.getId().x + ";" + plot.getId().y);
|
||||
return true;
|
||||
}
|
||||
String info = Captions.PLOT_INFO.getTranslated();
|
||||
String info = Captions.PLOT_INFO_FORMAT.getTranslated();
|
||||
boolean full;
|
||||
if (arg != null) {
|
||||
info = getCaption(arg);
|
||||
|
@ -465,10 +465,11 @@ public enum Captions implements Caption {
|
||||
PLOT_INFO_UNCLAIMED("$2Plot $1%s$2 is not yet claimed", "Info"),
|
||||
PLOT_INFO_HEADER("$3&m---------&r $1INFO $3&m---------", false, "Info"),
|
||||
PLOT_INFO_HIDDEN("$2You cannot view the information about this plot", "Info"),
|
||||
PLOT_INFO("$1ID: $2%id%$1&-" + "$1Alias:$2%alias%$1&-" + "$1Owner:$2%owner%$1&-"
|
||||
PLOT_INFO_FORMAT("$1ID: $2%id%$1&-" + "$1Area: $2%area%$1&-"
|
||||
+"$1Alias:$2%alias%$1&-" + "$1Owner:$2%owner%$1&-"
|
||||
+ "$1Biome: $2%biome%$1&-" + "$1Can Build: $2%build%$1&-" + "$1Rating: $2%rating%&-"
|
||||
+ "$1Seen: $2%seen%&-" + "$1Trusted:$2%trusted%$1&-" + "$1Members:$2%members%$1&-"
|
||||
+ "$1Denied:$2%denied%$1&-" + "$1Flags:$2%flags%", "Info"),
|
||||
+ "$1Denied:$2%denied%$1&-" + "$1Flags:$2%flags%&-$1Description: $2%desc%$1", "Info"),
|
||||
PLOT_INFO_FOOTER("$3&m---------&r $1INFO $3&m---------", false, "Info"),
|
||||
PLOT_INFO_TRUSTED("$1Trusted:$2%trusted%", "Info"),
|
||||
PLOT_INFO_MEMBERS("$1Members:$2%members%", "Info"),
|
||||
@ -483,7 +484,8 @@ public enum Captions implements Caption {
|
||||
PLOT_INFO_SIZE("$1Size:$2 %size%", "Info"),
|
||||
PLOT_INFO_SEEN("$1Seen:$2 %seen%", "Info"),
|
||||
PLOT_USER_LIST(" $1%user%$2,", "Info"),
|
||||
PLOT_FLAG_LIST("$1%s0:%s1$2", "Info"),
|
||||
PLOT_FLAG_LIST("$2%s0:%s1$3", "Info"),
|
||||
PLOT_NO_DESCRIPTION("No description set.", "Info"),
|
||||
INFO_SYNTAX_CONSOLE("$2/plot info X;Z", "Info"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Working">
|
||||
|
@ -104,7 +104,7 @@ public final class GlobalFlagContainer extends FlagContainer {
|
||||
this.addFlag(AnimalAttackFlag.ANIMAL_ATTACK_FALSE);
|
||||
this.addFlag(AnimalInteractFlag.ANIMAL_INTERACT_FALSE);
|
||||
this.addFlag(BlockBurnFlag.BLOCK_BURN_FALSE);
|
||||
this.addFlag(BlockIgnitionFlag.BLOCK_IGNITION_FALSE);
|
||||
this.addFlag(BlockIgnitionFlag.BLOCK_IGNITION_TRUE);
|
||||
this.addFlag(DeviceInteractFlag.DEVICE_INTERACT_FALSE);
|
||||
this.addFlag(DisablePhysicsFlag.DISABLE_PHYSICS_FALSE);
|
||||
this.addFlag(DropProtectionFlag.DROP_PROTECTION_FALSE);
|
||||
|
@ -787,7 +787,7 @@ public class MainUtil {
|
||||
if (flagCollection.isEmpty()) {
|
||||
flags.append(Captions.NONE.getTranslated());
|
||||
} else {
|
||||
String prefix = "";
|
||||
String prefix = " ";
|
||||
for (final PlotFlag<?, ?> flag : flagCollection) {
|
||||
Object value;
|
||||
if (flag instanceof DoubleFlag && !Settings.General.SCIENTIFIC) {
|
||||
@ -802,6 +802,12 @@ public class MainUtil {
|
||||
}
|
||||
boolean build = plot.isAdded(player.getUUID());
|
||||
String owner = plot.getOwners().isEmpty() ? "unowned" : getPlayerList(plot.getOwners());
|
||||
if (plot.getArea() != null) {
|
||||
info = info.replace("%area%", plot.getArea().worldname +
|
||||
(plot.getArea().id == null ? "" : "(" + plot.getArea().id + ")"));
|
||||
} else {
|
||||
info = info.replace("%area%", Captions.NONE.getTranslated());
|
||||
}
|
||||
info = info.replace("%id%", plot.getId().toString());
|
||||
info = info.replace("%alias%", alias);
|
||||
info = info.replace("%num%", String.valueOf(num));
|
||||
@ -816,7 +822,7 @@ public class MainUtil {
|
||||
info = info.replace("%seen%", seen);
|
||||
info = info.replace("%flags%", flags);
|
||||
info = info.replace("%build%", String.valueOf(build));
|
||||
info = info.replace("%desc%", "No description set.");
|
||||
info = info.replace("%desc%", Captions.PLOT_NO_DESCRIPTION.getTranslated());
|
||||
if (info.contains("%rating%")) {
|
||||
final String newInfo = info;
|
||||
TaskManager.runTaskAsync(() -> {
|
||||
|
Loading…
Reference in New Issue
Block a user