Skip to content

Commit 6cbb894

Browse files
Fix/plot info syntax message (#4671)
* Adding plot-info category messages * Use plot-info category list from language config
1 parent 6f0fa19 commit 6cbb894

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Core/src/main/java/com/plotsquared/core/command/Info.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import com.plotsquared.core.configuration.Settings;
2222
import com.plotsquared.core.configuration.caption.Caption;
23-
import com.plotsquared.core.configuration.caption.StaticCaption;
2423
import com.plotsquared.core.configuration.caption.TranslatableCaption;
2524
import com.plotsquared.core.database.DBFunc;
2625
import com.plotsquared.core.permissions.Permission;
@@ -131,13 +130,9 @@ public boolean onCommand(final PlotPlayer<?> player, String[] args) {
131130
info = getCaption(arg);
132131
if (info == null) {
133132
if (Settings.Ratings.USE_LIKES) {
134-
player.sendMessage(StaticCaption.of(
135-
"&6Categories&7: &amembers&7, &aalias&7, &abiome&7, &aseen&7, &adenied&7, &aflags&7, &aid&7, &asize&7, &atrusted&7, "
136-
+ "&aowner&7, " + " &alikes"));
133+
player.sendMessage(TranslatableCaption.of("info.plot_info_categories.use_likes"));
137134
} else {
138-
player.sendMessage(StaticCaption.of(
139-
"&6Categories&7: &amembers&7, &aalias&7, &abiome&7, &aseen&7, &adenied&7, &aflags&7, &aid&7, &asize&7, &atrusted&7, "
140-
+ "&aowner&7, " + " &arating"));
135+
player.sendMessage(TranslatableCaption.of("info.plot_info_categories.use_rating"));
141136
}
142137
return false;
143138
}

Core/src/main/resources/lang/messages_en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@
353353
"info.infinite": "<gray>Infinite</gray>",
354354
"info.plot_unowned": "<prefix><red>The current plot must have an owner to perform this action.</red>",
355355
"info.plot_info_unclaimed": "<prefix><gray>Plot <gold><plot></gold> is not yet claimed.</gray>",
356+
"info.plot_info_categories.use_rating": "<prefix><gold>Categories: </gold> <gray>members, alias, biome, seen, denied, flags, id, size, trusted, owner, rating</gray>",
357+
"info.plot_info_categories.use_likes": "<prefix><gold>Categories: </gold> <gray>members, alias, biome, seen, denied, flags, id, size, trusted, owner, likes</gray>",
356358
"info.plot_info_header": "<dark_gray><strikethrough>--------- <reset><gold>INFO </gold><dark_gray><strikethrough>---------</dark_gray><reset>",
357359
"info.plot_info_hidden": "<prefix><red>You cannot view the information about this plot.</red>",
358360
"info.plot_info_format": "<header>\n<gold>ID: <gray><id></gray>\nCreation: <gray><creationdate></gray>\nArea: <gray><area></gray>\nAlias: <gray><alias></gray>\nOwner: <gray><owner></gray>\nBiome: <gray><biome></gray>\nCan Build: <gray><build></gray>\nRating: <gray><rating></gray>\nSeen: <gray><seen></gray>\nTrusted: <gray><trusted></gray>\nMembers: <gray><members></gray>\nDenied: <gray><denied></gray>\nFlags: <gray><flags></gray>\nDescription: <gray><desc></gray></gold>\n<footer>",

0 commit comments

Comments
 (0)