mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 20:56:45 +01:00
Prefix changes and others
This commit is contained in:
parent
d6a80c7ea5
commit
3c8d7a808b
@ -349,7 +349,7 @@ public class BukkitUtil extends WorldUtil {
|
||||
@Override public void setBiomes(@Nonnull final String worldName, @Nonnull final CuboidRegion region, @Nonnull final BiomeType biomeType) {
|
||||
final World world = getWorld(worldName);
|
||||
if (world == null) {
|
||||
logger.warn("[P2] An error occured while setting the biome because the world was null", new RuntimeException());
|
||||
logger.warn("[P2] An error occurred while setting the biome because the world was null", new RuntimeException());
|
||||
return;
|
||||
}
|
||||
final Biome biome = BukkitAdapter.adapt(biomeType);
|
||||
|
@ -175,7 +175,7 @@ public class Claim extends SubCommand {
|
||||
try {
|
||||
TaskManager.getPlatformImplementation().sync(() -> {
|
||||
if (!plot.claim(player, true, finalSchematic, false)) {
|
||||
logger.info(TranslatableCaption.of("core.prefix") + String
|
||||
logger.info(TranslatableCaption.of("<prefix>") + String
|
||||
.format("Failed to claim plot %s", plot.getId().toCommaSeparatedString()));
|
||||
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
||||
plot.setOwnerAbs(null);
|
||||
@ -197,7 +197,7 @@ public class Claim extends SubCommand {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}, () -> {
|
||||
logger.info(TranslatableCaption.of("core.prefix") + String
|
||||
logger.info(TranslatableCaption.of("<prefix>") + String
|
||||
.format("Failed to add plot %s to the database",
|
||||
plot.getId().toCommaSeparatedString()));
|
||||
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
||||
|
@ -609,10 +609,7 @@ public class Cluster extends SubCommand {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case "members":
|
||||
case "admin":
|
||||
case "helper":
|
||||
case "helpers": {
|
||||
case "members": {
|
||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_HELPERS)) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
@ -623,7 +620,7 @@ public class Cluster extends SubCommand {
|
||||
if (args.length != 3) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
Template.of("value", "/plot cluster <members | admin | helper> <add | remove> <player>")
|
||||
Template.of("value", "/plot cluster members <add | remove> <player>")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -658,7 +655,7 @@ public class Cluster extends SubCommand {
|
||||
} else {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
Template.of("value", "/plot cluster helpers <add | remove> <player>")
|
||||
Template.of("value", "/plot cluster members <add | remove> <player>")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class Debug extends SubCommand {
|
||||
|
||||
@Override public boolean onCommand(PlotPlayer<?> player, String[] args) {
|
||||
if (args.length == 0 ) {
|
||||
player.sendMessage(StaticCaption.of("commandconfig.command_syntax"),
|
||||
player.sendMessage(TranslatableCaption.of("commandconfig.command_syntax"),
|
||||
Template.of("value", "/plot debug <loadedchunks | debug-players | logging | entitytypes | msg>"));
|
||||
}
|
||||
if (args.length > 0) {
|
||||
@ -121,11 +121,11 @@ public class Debug extends SubCommand {
|
||||
player.sendMessage(TranslatableCaption.of("debug.entity_categories"));
|
||||
EntityCategory.REGISTRY.forEach(category -> {
|
||||
final StringBuilder builder =
|
||||
new StringBuilder(" §7- §6").append(category.getId()).append("§7: §6");
|
||||
new StringBuilder("§7- §6").append(category.getId()).append("§7: §6");
|
||||
for (final EntityType entityType : category.getAll()) {
|
||||
builder.append(entityType.getId()).append(" ");
|
||||
}
|
||||
player.sendMessage(StaticCaption.of("core.prefix" + builder.toString()));
|
||||
player.sendMessage(StaticCaption.of("<prefix>" + builder.toString()));
|
||||
});
|
||||
EntityType.REGISTRY.values().stream().sorted(Comparator.comparing(EntityType::getId))
|
||||
.forEach(entityType -> {
|
||||
@ -134,7 +134,7 @@ public class Debug extends SubCommand {
|
||||
if (categoryCount > 0) {
|
||||
return;
|
||||
}
|
||||
player.sendMessage(StaticCaption.of("core.prefix" + entityType.getName() + " is in "
|
||||
player.sendMessage(StaticCaption.of("<prefix>" + entityType.getName() + " is in "
|
||||
+ categoryCount + " categories"));
|
||||
});
|
||||
return true;
|
||||
|
@ -334,11 +334,9 @@ public class DebugExec extends SubCommand {
|
||||
} else {
|
||||
player.sendMessage(TranslatableCaption.of("debugexec.expiry_already_started"));
|
||||
}
|
||||
case "h":
|
||||
case "he":
|
||||
case "?":
|
||||
case "help":
|
||||
player.sendMessage(StaticCaption.of("<core.prefix><gold>Possible sub commands: </gray>/plot debugexec <" + StringMan.join(allowed_params, " | ") + "></gray>"));
|
||||
player.sendMessage(StaticCaption.of("<prefix><gold>Possible sub commands: </gray>/plot debugexec <" + StringMan.join(allowed_params, " | ") + "></gray>"));
|
||||
return false;
|
||||
case "addcmd":
|
||||
try {
|
||||
|
@ -315,7 +315,8 @@ public class MainCommand extends Command {
|
||||
player.sendMessage(TranslatableCaption.of("errors.error"),
|
||||
net.kyori.adventure.text.minimessage.Template.of("value", message));
|
||||
} else {
|
||||
player.sendMessage(TranslatableCaption.of("errors.error"), net.kyori.adventure.text.minimessage.Template.of("value", ""));
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("errors.error_console"));
|
||||
}
|
||||
}
|
||||
// Reset command scope //
|
||||
|
@ -39,7 +39,6 @@ import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
@CommandDeclaration(command = "reload",
|
||||
|
@ -301,7 +301,7 @@
|
||||
"errors.invalid_player": "<prefix><red>Player not found: </red><gray><value></gray><red>.</red>",
|
||||
"errors.invalid_player_offline": "<prefix><gray><player></gray><red> must be online.</red>",
|
||||
"errors.invalid_command_flag": "<prefix><red>Invalid command flag: </red><value></gray>",
|
||||
"errors.error": "<prefix><red>An error occurred: <gray><value></gray></red>",
|
||||
"errors.error": "<prefix><red>An error occurred: </red></gray><value></gray>",
|
||||
"errors.error_create": "<prefix><red>An error occurred while creating the world: <gray><world></gray></red>",
|
||||
"errors.error_console": "<prefix><red>An error occurred. See the console for more information.</red>",
|
||||
"errors.command_went_wrong": "<prefix><red>Something went wrong when executing that command...</red>",
|
||||
|
Loading…
Reference in New Issue
Block a user