mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-28 17:38:01 +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) {
|
@Override public void setBiomes(@Nonnull final String worldName, @Nonnull final CuboidRegion region, @Nonnull final BiomeType biomeType) {
|
||||||
final World world = getWorld(worldName);
|
final World world = getWorld(worldName);
|
||||||
if (world == null) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
final Biome biome = BukkitAdapter.adapt(biomeType);
|
final Biome biome = BukkitAdapter.adapt(biomeType);
|
||||||
|
@ -175,7 +175,7 @@ public class Claim extends SubCommand {
|
|||||||
try {
|
try {
|
||||||
TaskManager.getPlatformImplementation().sync(() -> {
|
TaskManager.getPlatformImplementation().sync(() -> {
|
||||||
if (!plot.claim(player, true, finalSchematic, false)) {
|
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()));
|
.format("Failed to claim plot %s", plot.getId().toCommaSeparatedString()));
|
||||||
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
||||||
plot.setOwnerAbs(null);
|
plot.setOwnerAbs(null);
|
||||||
@ -197,7 +197,7 @@ public class Claim extends SubCommand {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}, () -> {
|
}, () -> {
|
||||||
logger.info(TranslatableCaption.of("core.prefix") + String
|
logger.info(TranslatableCaption.of("<prefix>") + String
|
||||||
.format("Failed to add plot %s to the database",
|
.format("Failed to add plot %s to the database",
|
||||||
plot.getId().toCommaSeparatedString()));
|
plot.getId().toCommaSeparatedString()));
|
||||||
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
player.sendMessage(TranslatableCaption.of("working.plot_not_claimed"));
|
||||||
|
@ -609,10 +609,7 @@ public class Cluster extends SubCommand {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "members":
|
case "members": {
|
||||||
case "admin":
|
|
||||||
case "helper":
|
|
||||||
case "helpers": {
|
|
||||||
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_HELPERS)) {
|
if (!Permissions.hasPermission(player, Permission.PERMISSION_CLUSTER_HELPERS)) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("permission.no_permission"),
|
TranslatableCaption.of("permission.no_permission"),
|
||||||
@ -623,7 +620,7 @@ public class Cluster extends SubCommand {
|
|||||||
if (args.length != 3) {
|
if (args.length != 3) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@ -658,7 +655,7 @@ public class Cluster extends SubCommand {
|
|||||||
} else {
|
} else {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
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) {
|
@Override public boolean onCommand(PlotPlayer<?> player, String[] args) {
|
||||||
if (args.length == 0 ) {
|
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>"));
|
Template.of("value", "/plot debug <loadedchunks | debug-players | logging | entitytypes | msg>"));
|
||||||
}
|
}
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
@ -125,7 +125,7 @@ public class Debug extends SubCommand {
|
|||||||
for (final EntityType entityType : category.getAll()) {
|
for (final EntityType entityType : category.getAll()) {
|
||||||
builder.append(entityType.getId()).append(" ");
|
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))
|
EntityType.REGISTRY.values().stream().sorted(Comparator.comparing(EntityType::getId))
|
||||||
.forEach(entityType -> {
|
.forEach(entityType -> {
|
||||||
@ -134,7 +134,7 @@ public class Debug extends SubCommand {
|
|||||||
if (categoryCount > 0) {
|
if (categoryCount > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendMessage(StaticCaption.of("core.prefix" + entityType.getName() + " is in "
|
player.sendMessage(StaticCaption.of("<prefix>" + entityType.getName() + " is in "
|
||||||
+ categoryCount + " categories"));
|
+ categoryCount + " categories"));
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
@ -334,11 +334,9 @@ public class DebugExec extends SubCommand {
|
|||||||
} else {
|
} else {
|
||||||
player.sendMessage(TranslatableCaption.of("debugexec.expiry_already_started"));
|
player.sendMessage(TranslatableCaption.of("debugexec.expiry_already_started"));
|
||||||
}
|
}
|
||||||
case "h":
|
|
||||||
case "he":
|
|
||||||
case "?":
|
case "?":
|
||||||
case "help":
|
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;
|
return false;
|
||||||
case "addcmd":
|
case "addcmd":
|
||||||
try {
|
try {
|
||||||
|
@ -315,7 +315,8 @@ public class MainCommand extends Command {
|
|||||||
player.sendMessage(TranslatableCaption.of("errors.error"),
|
player.sendMessage(TranslatableCaption.of("errors.error"),
|
||||||
net.kyori.adventure.text.minimessage.Template.of("value", message));
|
net.kyori.adventure.text.minimessage.Template.of("value", message));
|
||||||
} else {
|
} 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 //
|
// Reset command scope //
|
||||||
|
@ -39,7 +39,6 @@ import com.plotsquared.core.plot.world.PlotAreaManager;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@CommandDeclaration(command = "reload",
|
@CommandDeclaration(command = "reload",
|
||||||
|
@ -301,7 +301,7 @@
|
|||||||
"errors.invalid_player": "<prefix><red>Player not found: </red><gray><value></gray><red>.</red>",
|
"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_player_offline": "<prefix><gray><player></gray><red> must be online.</red>",
|
||||||
"errors.invalid_command_flag": "<prefix><red>Invalid command flag: </red><value></gray>",
|
"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_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.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>",
|
"errors.command_went_wrong": "<prefix><red>Something went wrong when executing that command...</red>",
|
||||||
|
Loading…
Reference in New Issue
Block a user