Rewrite/rename almost all messages

This commit is contained in:
Esophose 2018-10-01 22:23:05 -06:00
parent 8a73b21431
commit 4babd4a792
22 changed files with 332 additions and 589 deletions

View file

@ -27,19 +27,19 @@ public class AddCommandModule implements CommandModule {
ParticleEffect effect = ParticleManager.effectFromString(args[0]);
if (effect == null) {
LangManager.sendMessage(pplayer, Lang.INVALID_EFFECT, args[0]);
LangManager.sendMessage(pplayer, Lang.EFFECT_INVALID, args[0]);
return;
} else if (!PermissionManager.hasEffectPermission(pplayer.getPlayer(), effect)) {
LangManager.sendMessage(pplayer, Lang.NO_PERMISSION, effect.getName());
LangManager.sendMessage(pplayer, Lang.EFFECT_NO_PERMISSION, effect.getName());
return;
}
ParticleStyle style = ParticleStyleManager.styleFromString(args[1]);
if (style == null) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_INVALID_STYLE, args[1]);
LangManager.sendMessage(pplayer, Lang.STYLE_INVALID, args[1]);
return;
} else if (!PermissionManager.hasStylePermission(pplayer.getPlayer(), style)) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_NO_PERMISSION_STYLE, args[1]);
LangManager.sendMessage(pplayer, Lang.STYLE_NO_PERMISSION, args[1]);
return;
}
@ -58,12 +58,12 @@ public class AddCommandModule implements CommandModule {
try {
note = Integer.parseInt(args[2]);
} catch (Exception e) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_DATA_ERROR, "note");
LangManager.sendMessage(pplayer, Lang.DATA_INVALID_NOTE);
return;
}
if (note < 0 || note > 23) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_DATA_ERROR, "note");
LangManager.sendMessage(pplayer, Lang.DATA_INVALID_NOTE);
return;
}
@ -82,12 +82,12 @@ public class AddCommandModule implements CommandModule {
g = Integer.parseInt(args[3]);
b = Integer.parseInt(args[4]);
} catch (Exception e) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_DATA_ERROR, "color");
LangManager.sendMessage(pplayer, Lang.DATA_INVALID_COLOR);
return;
}
if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_DATA_ERROR, "color");
LangManager.sendMessage(pplayer, Lang.DATA_INVALID_COLOR);
return;
}
@ -100,7 +100,7 @@ public class AddCommandModule implements CommandModule {
blockData = ParticleUtils.closestMatch(args[2]);
if (blockData == null) throw new Exception();
} catch (Exception e) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_DATA_ERROR, "block");
LangManager.sendMessage(pplayer, Lang.DATA_INVALID_BLOCK);
return;
}
} else if (effect == ParticleEffect.ITEM) {
@ -108,7 +108,7 @@ public class AddCommandModule implements CommandModule {
itemData = ParticleUtils.closestMatch(args[2]);
if (itemData == null) throw new Exception();
} catch (Exception e) {
LangManager.sendMessage(pplayer, Lang.CREATE_FIXED_DATA_ERROR, "item");
LangManager.sendMessage(pplayer, Lang.DATA_INVALID_ITEM);
return;
}
}
@ -127,7 +127,7 @@ public class AddCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.ADD_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_ADD;
}
public String getArguments() {

View file

@ -59,7 +59,6 @@ public interface CommandModule {
* @param command The command to display usage for
*/
public static void printUsage(PPlayer pplayer, CommandModule command) {
LangManager.sendMessage(pplayer, Lang.COMMAND_MISSING_ARGS);
LangManager.sendCustomMessage(pplayer, String.format("/{0} {1}", command.getName(), command.getArguments()));
}
@ -72,7 +71,6 @@ public interface CommandModule {
* @param subCommandArgs The sub-command's arguments
*/
public static void printSubcommandUsage(PPlayer pplayer, CommandModule command, String subCommandName, String subCommandArgs) {
LangManager.sendMessage(pplayer, Lang.COMMAND_MISSING_ARGS);
LangManager.sendCustomMessage(pplayer, String.format("/{0} {1} {2}", command.getName(), subCommandName, subCommandArgs));
}

View file

@ -17,26 +17,22 @@ public class DataCommandModule implements CommandModule {
if ((!effect.hasProperty(ParticleProperty.REQUIRES_MATERIAL_DATA) && !effect.hasProperty(ParticleProperty.COLORABLE)) || args.length == 0) {
if (effect.hasProperty(ParticleProperty.COLORABLE)) {
if (effect == ParticleEffect.NOTE) {
LangManager.sendMessage(pplayer, Lang.DATA_USAGE, "note");
LangManager.sendCustomMessage(pplayer, LangManager.getText(Lang.USAGE) + " " + LangManager.getText(Lang.NOTE_DATA_USAGE));
LangManager.sendMessage(pplayer, Lang.DATA_USAGE_NOTE);
} else {
LangManager.sendMessage(pplayer, Lang.DATA_USAGE, "color");
LangManager.sendCustomMessage(pplayer, LangManager.getText(Lang.USAGE) + " " + LangManager.getText(Lang.COLOR_DATA_USAGE));
LangManager.sendMessage(pplayer, Lang.DATA_USAGE_COLOR);
}
} else if (effect.hasProperty(ParticleProperty.REQUIRES_MATERIAL_DATA)) {
if (effect == ParticleEffect.ITEM) {
LangManager.sendMessage(pplayer, Lang.DATA_USAGE, "item");
LangManager.sendCustomMessage(pplayer, LangManager.getText(Lang.USAGE) + " " + LangManager.getText(Lang.ITEM_DATA_USAGE));
LangManager.sendMessage(pplayer, Lang.DATA_USAGE_ITEM);
} else {
LangManager.sendMessage(pplayer, Lang.DATA_USAGE, "block");
LangManager.sendCustomMessage(pplayer, LangManager.getText(Lang.USAGE) + " " + LangManager.getText(Lang.BLOCK_DATA_USAGE));
LangManager.sendMessage(pplayer, Lang.DATA_USAGE_BLOCK);
}
} else {
LangManager.sendMessage(pplayer, Lang.NO_DATA_USAGE);
LangManager.sendMessage(pplayer, Lang.DATA_USAGE_NONE);
}
}
} else {
LangManager.sendMessage(pplayer, Lang.INVALID_EFFECT);
LangManager.sendMessage(pplayer, Lang.EFFECT_INVALID);
}
}
@ -49,7 +45,7 @@ public class DataCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.DATA_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_DATA;
}
public String getArguments() {

View file

@ -21,7 +21,7 @@ public class DefaultCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.DEFAULT_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_DEFAULT;
}
public String getArguments() {

View file

@ -20,7 +20,7 @@ public class EditCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.EDIT_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_EDIT;
}
public String getArguments() {

View file

@ -9,7 +9,7 @@ import com.esophose.playerparticles.particles.PPlayer;
public class EffectCommandModule implements CommandModule {
public void onCommandExecute(PPlayer pplayer, String[] args) {
LangManager.sendMessage(pplayer, Lang.COMMAND_REMOVED);
LangManager.sendMessage(pplayer, Lang.COMMAND_DESCRIPTION_EFFECT);
}
public List<String> onTabComplete(PPlayer pplayer, String[] args) {
@ -21,7 +21,7 @@ public class EffectCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.EFFECT_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_EFFECT;
}
public String getArguments() {

View file

@ -15,12 +15,13 @@ public class EffectsCommandModule implements CommandModule {
public void onCommandExecute(PPlayer pplayer, String[] args) {
Player p = pplayer.getPlayer();
if (PermissionManager.getEffectsUserHasPermissionFor(p).size() == 1) {
LangManager.sendMessage(p, Lang.NO_PARTICLES);
List<String> effectList = PermissionManager.getEffectsUserHasPermissionFor(p);
if (effectList.size() == 1) {
LangManager.sendMessage(p, Lang.EFFECT_LIST, effectList.get(0));
return;
}
String toSend = LangManager.getText(Lang.USE) + " ";
String toSend = "";
for (ParticleEffect effect : ParticleEffect.getSupportedEffects()) {
if (PermissionManager.hasEffectPermission(p, effect)) {
toSend += effect.getName() + ", ";
@ -31,8 +32,7 @@ public class EffectsCommandModule implements CommandModule {
toSend = toSend.substring(0, toSend.length() - 2);
}
LangManager.sendCustomMessage(p, toSend);
LangManager.sendCustomMessage(p, LangManager.getText(Lang.USAGE) + " " + LangManager.getText(Lang.PARTICLE_USAGE));
LangManager.sendMessage(p, Lang.EFFECT_LIST, toSend);
}
public List<String> onTabComplete(PPlayer pplayer, String[] args) {
@ -44,7 +44,7 @@ public class EffectsCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.EFFECTS_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_EFFECTS;
}
public String getArguments() {

View file

@ -31,17 +31,18 @@ public class FixedCommandModule implements CommandModule {
Player p = pplayer.getPlayer();
if (!PermissionManager.canUseFixedEffects(p)) {
LangManager.sendMessage(p, Lang.NO_PERMISSION_FIXED);
LangManager.sendMessage(p, Lang.FIXED_NO_PERMISSION);
return;
}
if (args.length == 0) { // General information on command
LangManager.sendMessage(p, Lang.INVALID_FIXED_COMMAND);
LangManager.sendMessage(p, Lang.FIXED_COMMAND_DESC_CREATE);
LangManager.sendMessage(p, Lang.FIXED_COMMAND_DESC_REMOVE);
LangManager.sendMessage(p, Lang.FIXED_COMMAND_DESC_LIST);
LangManager.sendMessage(p, Lang.FIXED_COMMAND_DESC_INFO);
if (p.hasPermission("playerparticles.fixed.clear")) LangManager.sendMessage(p, Lang.FIXED_COMMAND_DESC_CLEAR);
LangManager.sendMessage(p, Lang.FIXED_INVALID_COMMAND);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_CREATE);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_REMOVE);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_LIST);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_INFO);
if (p.hasPermission("playerparticles.fixed.clear"))
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_CLEAR);
return;
}
@ -56,12 +57,12 @@ public class FixedCommandModule implements CommandModule {
if (cmd.equalsIgnoreCase("create")) {
boolean reachedMax = DataManager.hasPlayerReachedMaxFixedEffects(pplayer);
if (reachedMax) {
LangManager.sendMessage(p, Lang.MAX_FIXED_EFFECTS_REACHED);
LangManager.sendMessage(p, Lang.FIXED_MAX_REACHED);
return;
}
if (args.length < 5) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_MISSING_ARGS, (5 - args.length) + "");
LangManager.sendMessage(p, Lang.FIXED_CREATE_MISSING_ARGS, (5 - args.length) + "");
return;
}
@ -88,37 +89,37 @@ public class FixedCommandModule implements CommandModule {
zPos = Double.parseDouble(args[2]);
}
} catch (Exception e) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_INVALID_COORDS);
LangManager.sendMessage(p, Lang.FIXED_CREATE_INVALID_COORDS);
return;
}
double distanceFromEffect = p.getLocation().distance(new Location(p.getWorld(), xPos, yPos, zPos));
int maxCreationDistance = DataManager.getMaxFixedEffectCreationDistance();
if (maxCreationDistance != 0 && distanceFromEffect > maxCreationDistance) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_OUT_OF_RANGE, maxCreationDistance + "");
LangManager.sendMessage(p, Lang.FIXED_CREATE_OUT_OF_RANGE, maxCreationDistance + "");
return;
}
ParticleEffect effect = ParticleManager.effectFromString(args[3]);
if (effect == null) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_INVALID_EFFECT, args[3]);
LangManager.sendMessage(p, Lang.FIXED_CREATE_EFFECT_INVALID, args[3]);
return;
} else if (!PermissionManager.hasEffectPermission(p, effect)) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_NO_PERMISSION_EFFECT, effect.getName());
LangManager.sendMessage(p, Lang.FIXED_CREATE_EFFECT_NO_PERMISSION, effect.getName());
return;
}
ParticleStyle style = ParticleStyleManager.styleFromString(args[4]);
if (style == null) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_INVALID_STYLE, args[4]);
LangManager.sendMessage(p, Lang.FIXED_CREATE_STYLE_INVALID, args[4]);
return;
} else if (!PermissionManager.hasStylePermission(p, style)) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_NO_PERMISSION_STYLE, args[4]);
LangManager.sendMessage(p, Lang.FIXED_CREATE_STYLE_NO_PERMISSION, args[4]);
return;
}
if (!style.canBeFixed()) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_NON_FIXABLE_STYLE, style.getName());
LangManager.sendMessage(p, Lang.FIXED_CREATE_STYLE_NON_FIXABLE, style.getName());
return;
}
@ -137,12 +138,12 @@ public class FixedCommandModule implements CommandModule {
try {
note = Integer.parseInt(args[5]);
} catch (Exception e) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_DATA_ERROR, "note");
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
return;
}
if (note < 0 || note > 23) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_DATA_ERROR, "note");
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
return;
}
@ -161,12 +162,12 @@ public class FixedCommandModule implements CommandModule {
g = Integer.parseInt(args[6]);
b = Integer.parseInt(args[7]);
} catch (Exception e) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_DATA_ERROR, "color");
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
return;
}
if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_DATA_ERROR, "color");
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
return;
}
@ -181,7 +182,7 @@ public class FixedCommandModule implements CommandModule {
if (material == null) material = Material.matchMaterial(args[5]);
if (material == null) throw new Exception();
} catch (Exception e) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_DATA_ERROR, "block");
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
return;
}
@ -193,7 +194,7 @@ public class FixedCommandModule implements CommandModule {
if (material == null) material = Material.matchMaterial(args[5]);
if (material == null) throw new Exception();
} catch (Exception e) {
LangManager.sendMessage(p, Lang.CREATE_FIXED_DATA_ERROR, "item");
LangManager.sendMessage(p, Lang.FIXED_CREATE_DATA_ERROR);
return;
}
@ -206,11 +207,11 @@ public class FixedCommandModule implements CommandModule {
ParticlePair particle = new ParticlePair(pplayer.getUniqueId(), nextFixedEffectId, effect, style, itemData, blockData, colorData, noteColorData);
FixedParticleEffect fixedEffect = new FixedParticleEffect(p.getUniqueId(), nextFixedEffectId, p.getLocation().getWorld().getName(), xPos, yPos, zPos, particle);
LangManager.sendMessage(p, Lang.CREATE_FIXED_SUCCESS);
LangManager.sendMessage(p, Lang.FIXED_CREATE_SUCCESS);
DataManager.saveFixedEffect(fixedEffect);
} else if (cmd.equalsIgnoreCase("remove")) {
if (args.length < 1) {
LangManager.sendMessage(p, Lang.REMOVE_FIXED_NO_ARGS);
LangManager.sendMessage(p, Lang.FIXED_REMOVE_NO_ARGS);
return;
}
@ -218,26 +219,26 @@ public class FixedCommandModule implements CommandModule {
try {
id = Integer.parseInt(args[0]);
} catch (Exception e) {
LangManager.sendMessage(p, Lang.REMOVE_FIXED_INVALID_ARGS);
LangManager.sendMessage(p, Lang.FIXED_REMOVE_ARGS_INVALID);
return;
}
if (pplayer.getFixedEffectById(id) != null) {
DataManager.removeFixedEffect(pplayer.getUniqueId(), id);
LangManager.sendMessage(p, Lang.REMOVE_FIXED_SUCCESS, id + "");
LangManager.sendMessage(p, Lang.FIXED_REMOVE_SUCCESS, id + "");
} else {
LangManager.sendMessage(p, Lang.REMOVE_FIXED_NONEXISTANT, id + "");
LangManager.sendMessage(p, Lang.FIXED_REMOVE_INVALID, id + "");
}
} else if (cmd.equalsIgnoreCase("list")) {
List<Integer> ids = pplayer.getFixedEffectIds();
Collections.sort(ids);
if (ids.isEmpty()) {
LangManager.sendMessage(p, Lang.LIST_FIXED_NONE);
LangManager.sendMessage(p, Lang.FIXED_LIST_NONE);
return;
}
String msg = LangManager.getText(Lang.LIST_FIXED_SUCCESS);
String msg = LangManager.getText(Lang.FIXED_LIST_SUCCESS);
boolean first = true;
for (int id : ids) {
if (!first) msg += ", ";
@ -248,7 +249,7 @@ public class FixedCommandModule implements CommandModule {
LangManager.sendCustomMessage(p, msg);
} else if (cmd.equalsIgnoreCase("info")) {
if (args.length < 1) {
LangManager.sendMessage(p, Lang.INFO_FIXED_NO_ARGS);
LangManager.sendMessage(p, Lang.FIXED_INFO_NO_ARGS);
return;
}
@ -256,37 +257,38 @@ public class FixedCommandModule implements CommandModule {
try {
id = Integer.parseInt(args[0]);
} catch (Exception e) {
LangManager.sendMessage(p, Lang.INFO_FIXED_INVALID_ARGS);
LangManager.sendMessage(p, Lang.FIXED_INFO_INVALID_ARGS);
return;
}
FixedParticleEffect fixedEffect = pplayer.getFixedEffectById(id);
if (fixedEffect == null) {
LangManager.sendMessage(p, Lang.INFO_FIXED_NONEXISTANT, id + "");
LangManager.sendMessage(p, Lang.FIXED_INFO_INVALID, id + "");
return;
}
ParticlePair particle = fixedEffect.getParticlePair();
DecimalFormat df = new DecimalFormat("0.##"); // Decimal formatter so the coords aren't super long
String listMessage = LangManager.getText(Lang.INFO_FIXED_INFO) // @formatter:off
.replaceAll("\\{0\\}", fixedEffect.getId() + "")
.replaceAll("\\{1\\}", fixedEffect.getLocation().getWorld().getName())
.replaceAll("\\{2\\}", df.format(fixedEffect.getLocation().getX()) + "")
.replaceAll("\\{3\\}", df.format(fixedEffect.getLocation().getY()) + "")
.replaceAll("\\{4\\}", df.format(fixedEffect.getLocation().getZ()) + "")
.replaceAll("\\{5\\}", particle.getEffect().getName())
.replaceAll("\\{6\\}", particle.getStyle().getName())
.replaceAll("\\{7\\}", particle.getDataString()); // @formatter:on
LangManager.sendCustomMessage(p, listMessage);
LangManager.sendMessage(p, // @formatter:off
Lang.FIXED_INFO_SUCCESS,
fixedEffect.getId() + "",
fixedEffect.getLocation().getWorld().getName(),
df.format(fixedEffect.getLocation().getX()) + "",
df.format(fixedEffect.getLocation().getY()) + "",
df.format(fixedEffect.getLocation().getZ()) + "",
particle.getEffect().getName(),
particle.getStyle().getName(),
particle.getDataString()
); // @formatter:on
} else if (cmd.equalsIgnoreCase("clear")) {
if (!p.hasPermission("playerparticles.fixed.clear")) {
LangManager.sendMessage(p, Lang.CLEAR_FIXED_NO_PERMISSION);
LangManager.sendMessage(p, Lang.FIXED_CLEAR_NO_PERMISSION);
return;
}
if (args.length < 1) {
LangManager.sendMessage(p, Lang.CLEAR_FIXED_NO_ARGS);
LangManager.sendMessage(p, Lang.FIXED_CLEAR_NO_ARGS);
return;
}
@ -294,7 +296,7 @@ public class FixedCommandModule implements CommandModule {
try {
radius = Math.abs(Integer.parseInt(args[0]));
} catch (Exception e) {
LangManager.sendMessage(p, Lang.CLEAR_FIXED_INVALID_ARGS);
LangManager.sendMessage(p, Lang.FIXED_CLEAR_INVALID_ARGS);
return;
}
@ -307,17 +309,16 @@ public class FixedCommandModule implements CommandModule {
for (FixedParticleEffect fixedEffect : fixedEffectsToRemove)
DataManager.removeFixedEffect(fixedEffect.getOwnerUniqueId(), fixedEffect.getId());
String clearMessage = LangManager.getText(Lang.CLEAR_FIXED_SUCCESS) // @formatter:off
.replaceAll("\\{0\\}", fixedEffectsToRemove.size() + "").replaceAll("\\{1\\}", radius + ""); // @formatter:on
LangManager.sendCustomMessage(pplayer, clearMessage);
LangManager.sendMessage(p, Lang.FIXED_CLEAR_SUCCESS, fixedEffectsToRemove.size() + "", radius + "");
return;
} else {
LangManager.sendMessage(pplayer, Lang.INVALID_FIXED_COMMAND);
LangManager.sendMessage(pplayer, Lang.FIXED_COMMAND_DESC_CREATE);
LangManager.sendMessage(pplayer, Lang.FIXED_COMMAND_DESC_REMOVE);
LangManager.sendMessage(pplayer, Lang.FIXED_COMMAND_DESC_LIST);
LangManager.sendMessage(pplayer, Lang.FIXED_COMMAND_DESC_INFO);
if (p.hasPermission("playerparticles.fixed.clear")) LangManager.sendMessage(p, Lang.FIXED_COMMAND_DESC_CLEAR);
LangManager.sendMessage(pplayer, Lang.FIXED_INVALID_COMMAND);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_CREATE);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_REMOVE);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_LIST);
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_INFO);
if (p.hasPermission("playerparticles.fixed.clear"))
LangManager.sendMessage(p, Lang.COMMAND_DESCRIPTION_FIXED_CLEAR);
}
}
@ -330,7 +331,7 @@ public class FixedCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.FIXED_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_FIXED;
}
public String getArguments() {

View file

@ -19,7 +19,7 @@ public class GUICommandModule implements CommandModule {
if (PlayerParticlesGui.isGuiDisabled()) {
if (byDefault) {
LangManager.sendMessage(pplayer, Lang.INVALID_ARGUMENTS);
LangManager.sendMessage(pplayer, Lang.COMMAND_ERROR_UNKNOWN);
} else {
LangManager.sendMessage(pplayer, Lang.GUI_DISABLED);
}
@ -28,9 +28,9 @@ public class GUICommandModule implements CommandModule {
if (PermissionManager.getEffectsUserHasPermissionFor(pplayer.getPlayer()).size() == 1) {
if (byDefault) {
LangManager.sendMessage(pplayer, Lang.INVALID_ARGUMENTS);
LangManager.sendMessage(pplayer, Lang.COMMAND_ERROR_UNKNOWN);
} else {
LangManager.sendMessage(pplayer, Lang.NO_PARTICLES);
LangManager.sendMessage(pplayer, Lang.COMMAND_ERROR_NO_EFFECTS);
}
return;
}
@ -51,7 +51,7 @@ public class GUICommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.GUI_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_GUI;
}
public String getArguments() {

View file

@ -20,7 +20,7 @@ public class GroupCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.GROUP_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_GROUP;
}
public String getArguments() {

View file

@ -2,15 +2,13 @@ package com.esophose.playerparticles.command;
import java.util.List;
import com.esophose.playerparticles.manager.LangManager;
import com.esophose.playerparticles.manager.LangManager.Lang;
import com.esophose.playerparticles.particles.PPlayer;
public class HelpCommandModule implements CommandModule {
public void onCommandExecute(PPlayer pplayer, String[] args) {
LangManager.sendMessage(pplayer, Lang.AVAILABLE_COMMANDS); // TODO: Rewrite to be dynamically generated from the ParticleCommandHandler's registered CommandModules
LangManager.sendMessage(pplayer, Lang.COMMAND_USAGE);
// TODO: Rewrite to be dynamically generated from the ParticleCommandHandler's registered CommandModules
}
public List<String> onTabComplete(PPlayer pplayer, String[] args) {
@ -22,7 +20,7 @@ public class HelpCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.HELP_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_HELP;
}
public String getArguments() {

View file

@ -20,7 +20,7 @@ public class InfoCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.INFO_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_INFO;
}
public String getArguments() {

View file

@ -20,7 +20,7 @@ public class ListCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.LIST_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_LIST;
}
public String getArguments() {

View file

@ -78,14 +78,14 @@ public class ParticleCommandHandler implements CommandExecutor, TabCompleter {
if (commandModule != null) {
if (commandModule.requiresEffects() && PermissionManager.getEffectsUserHasPermissionFor(p).size() == 1) {
LangManager.sendMessage(p, Lang.NO_PARTICLES); // TODO: Rename to NO_EFFECTS
LangManager.sendMessage(p, Lang.COMMAND_ERROR_NO_EFFECTS);
} else {
String[] cmdArgs = new String[0];
if (args.length > 1) cmdArgs = Arrays.copyOfRange(args, 1, args.length);
commandModule.onCommandExecute(pplayer, cmdArgs);
}
} else {
LangManager.sendMessage(p, Lang.INVALID_ARGUMENTS); // TODO: Rename to UNKNOWN_COMMAND
LangManager.sendMessage(p, Lang.COMMAND_ERROR_UNKNOWN);
}
});

View file

@ -20,7 +20,7 @@ public class RemoveCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.REMOVE_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_REMOVE;
}
public String getArguments() {

View file

@ -18,7 +18,7 @@ public class ResetCommandModule implements CommandModule {
if (args.length >= 1) {
String altPlayerName = args[0];
if (!PermissionManager.canUseForceReset(pplayer.getPlayer())) {
LangManager.sendMessage(pplayer, Lang.FAILED_EXECUTE_NO_PERMISSION, altPlayerName);
LangManager.sendMessage(pplayer, Lang.EXECUTE_FAILED_NO_PERMISSION, altPlayerName);
} else {
Player targetPlayer = null;
for (Player p : Bukkit.getOnlinePlayers()) {
@ -29,17 +29,17 @@ public class ResetCommandModule implements CommandModule {
}
if (targetPlayer == null) {
LangManager.sendMessage(pplayer, Lang.FAILED_EXECUTE_NOT_FOUND, altPlayerName);
LangManager.sendMessage(pplayer, Lang.EXECUTE_FAILED_NOT_FOUND, altPlayerName);
} else {
DataManager.saveParticleGroup(targetPlayer.getUniqueId(), ParticleGroup.getDefaultGroup());
LangManager.sendMessage(targetPlayer, Lang.RESET);
LangManager.sendMessage(targetPlayer, Lang.RESET_SUCCESS);
LangManager.sendMessage(pplayer, Lang.EXECUTED_FOR_PLAYER, targetPlayer.getName());
LangManager.sendMessage(pplayer, Lang.EXECUTE_SUCCESS, targetPlayer.getName());
}
}
} else {
DataManager.saveParticleGroup(pplayer.getUniqueId(), ParticleGroup.getDefaultGroup());
LangManager.sendMessage(pplayer, Lang.RESET);
LangManager.sendMessage(pplayer, Lang.RESET_SUCCESS);
}
}
@ -52,7 +52,7 @@ public class ResetCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.RESET_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_RESET;
}
public String getArguments() {

View file

@ -9,7 +9,7 @@ import com.esophose.playerparticles.particles.PPlayer;
public class StyleCommandModule implements CommandModule {
public void onCommandExecute(PPlayer pplayer, String[] args) {
LangManager.sendMessage(pplayer, Lang.COMMAND_REMOVED);
LangManager.sendMessage(pplayer, Lang.COMMAND_DESCRIPTION_STYLE);
}
public List<String> onTabComplete(PPlayer pplayer, String[] args) {
@ -21,7 +21,7 @@ public class StyleCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.STYLE_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_STYLE;
}
public String getArguments() {

View file

@ -16,12 +16,13 @@ public class StylesCommandModule implements CommandModule {
public void onCommandExecute(PPlayer pplayer, String[] args) {
Player p = pplayer.getPlayer();
if (PermissionManager.getStylesUserHasPermissionFor(p).size() == 1) {
LangManager.sendMessage(pplayer, Lang.NO_STYLES);
List<String> styleNames = PermissionManager.getStylesUserHasPermissionFor(p);
if (styleNames.size() == 1) {
LangManager.sendMessage(pplayer, Lang.STYLE_LIST, styleNames.get(0));
return;
}
String toSend = LangManager.getText(Lang.USE) + " ";
String toSend = "";
for (ParticleStyle style : ParticleStyleManager.getStyles()) {
if (PermissionManager.hasStylePermission(p, style)) {
toSend += style.getName();
@ -32,8 +33,7 @@ public class StylesCommandModule implements CommandModule {
toSend = toSend.substring(0, toSend.length() - 2);
}
LangManager.sendCustomMessage(p, toSend);
LangManager.sendCustomMessage(p, LangManager.getText(Lang.USAGE) + " " + LangManager.getText(Lang.STYLE_USAGE));
LangManager.sendMessage(p, Lang.STYLE_LIST, toSend);
}
public List<String> onTabComplete(PPlayer pplayer, String[] args) {
@ -45,7 +45,7 @@ public class StylesCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.STYLES_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_STYLES;
}
public String getArguments() {

View file

@ -25,7 +25,7 @@ public class VersionCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.VERSION_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_VERSION;
}
public String getArguments() {

View file

@ -33,7 +33,7 @@ public class WorldsCommandModule implements CommandModule {
}
public Lang getDescription() {
return Lang.WORLDS_COMMAND_DESCRIPTION;
return Lang.COMMAND_DESCRIPTION_WORLDS;
}
public String getArguments() {

View file

@ -20,123 +20,122 @@ public class LangManager {
* Contains the location in the .lang file of every chat message
*/
public static enum Lang {
// Command Errors
COMMAND_ERROR_NO_EFFECTS,
COMMAND_ERROR_UNKNOWN,
// Command Descriptions
ADD_COMMAND_DESCRIPTION("add-command-description"),
DATA_COMMAND_DESCRIPTION("data-command-description"),
DEFAULT_COMMAND_DESCRIPTION("default-command-description"),
EDIT_COMMAND_DESCRIPTION("edit-command-description"),
EFFECT_COMMAND_DESCRIPTION("effect-command-description"),
EFFECTS_COMMAND_DESCRIPTION("effects-command-description"),
FIXED_COMMAND_DESCRIPTION("fixed-command-description"),
GROUP_COMMAND_DESCRIPTION("group-command-description"),
GUI_COMMAND_DESCRIPTION("gui-command-description"),
HELP_COMMAND_DESCRIPTION("help-command-description"),
INFO_COMMAND_DESCRIPTION("info-command-description"),
LIST_COMMAND_DESCRIPTION("list-command-description"),
REMOVE_COMMAND_DESCRIPTION("remove-command-description"),
RESET_COMMAND_DESCRIPTION("reset-command-description"),
STYLE_COMMAND_DESCRIPTION("style-command-description"),
STYLES_COMMAND_DESCRIPTION("styles-command-description"),
VERSION_COMMAND_DESCRIPTION("version-command-description"),
WORLDS_COMMAND_DESCRIPTION("worlds-command-description"),
COMMAND_REMOVED("command-removed"),
COMMAND_MISSING_ARGS("command-missing-args"),
// Particles
NO_PERMISSION("no-permission"),
NO_PARTICLES("no-particles"),
NOW_USING("now-using"),
CLEARED_PARTICLES("cleared-particles"),
INVALID_EFFECT("invalid-effect"),
PARTICLE_USAGE("particle-usage"),
COMMAND_DESCRIPTION_ADD,
COMMAND_DESCRIPTION_DATA,
COMMAND_DESCRIPTION_DEFAULT,
COMMAND_DESCRIPTION_EDIT,
COMMAND_DESCRIPTION_EFFECT,
COMMAND_DESCRIPTION_EFFECTS,
COMMAND_DESCRIPTION_FIXED,
COMMAND_DESCRIPTION_GROUP,
COMMAND_DESCRIPTION_GUI,
COMMAND_DESCRIPTION_HELP,
COMMAND_DESCRIPTION_INFO,
COMMAND_DESCRIPTION_LIST,
COMMAND_DESCRIPTION_REMOVE,
COMMAND_DESCRIPTION_RESET,
COMMAND_DESCRIPTION_STYLE,
COMMAND_DESCRIPTION_STYLES,
COMMAND_DESCRIPTION_VERSION,
COMMAND_DESCRIPTION_WORLDS,
// Sub-Command Usage
COMMAND_DESCRIPTION_FIXED_CREATE,
COMMAND_DESCRIPTION_FIXED_REMOVE,
COMMAND_DESCRIPTION_FIXED_LIST,
COMMAND_DESCRIPTION_FIXED_INFO,
COMMAND_DESCRIPTION_FIXED_CLEAR,
COMMAND_DESCRIPTION_GROUP_SAVE,
COMMAND_DESCRIPTION_GROUP_LOAD,
COMMAND_DESCRIPTION_GROUP_REMOVE,
// Effects
EFFECT_NO_PERMISSION,
EFFECT_INVALID,
EFFECT_LIST,
// Styles
NO_PERMISSION_STYLE("no-permission-style"),
NO_STYLES("no-styles"),
NOW_USING_STYLE("now-using-style"),
CLEARED_STYLE("cleared-style"),
INVALID_TYPE_STYLE("invalid-type-style"),
STYLE_USAGE("style-usage"),
STYLE_NO_PERMISSION,
STYLE_INVALID,
STYLE_LIST,
// Data
DATA_USAGE("data-usage"),
NO_DATA_USAGE("no-data-usage"),
DATA_APPLIED("data-applied"),
DATA_INVALID_ARGUMENTS("data-invalid-arguments"),
DATA_MATERIAL_UNKNOWN("data-material-unknown"),
DATA_MATERIAL_MISMATCH("data-material-mismatch"),
NOTE_DATA_USAGE("note-data-usage"),
COLOR_DATA_USAGE("color-data-usage"),
ITEM_DATA_USAGE("item-data-usage"),
BLOCK_DATA_USAGE("block-data-usage"),
DATA_USAGE_NONE,
DATA_USAGE_BLOCK,
DATA_USAGE_ITEM,
DATA_USAGE_COLOR,
DATA_USAGE_NOTE,
DATA_INVALID_BLOCK,
DATA_INVALID_ITEM,
DATA_INVALID_COLOR,
DATA_INVALID_NOTE,
DATA_INVALID_MATERIAL_NOT_ITEM,
DATA_INVALID_MATERIAL_NOT_BLOCK,
DATA_INVALID_MATERIAL_ITEM,
DATA_INVALID_MATERIAL_BLOCK,
// Worlds
DISABLED_WORLDS,
DISABLED_WORLDS_NONE,
// Alternate Player Command Execution
EXECUTE_SUCCESS,
EXECUTE_FAILED_NOT_FOUND,
EXECUTE_FAILED_NO_PERMISSION,
// Reset
RESET_SUCCESS,
// Fixed Effects
FIXED_COMMAND_DESC_CREATE("fixed-command-desc-create"),
FIXED_COMMAND_DESC_REMOVE("fixed-command-desc-remove"),
FIXED_COMMAND_DESC_LIST("fixed-command-desc-list"),
FIXED_COMMAND_DESC_INFO("fixed-command-desc-info"),
FIXED_COMMAND_DESC_CLEAR("fixed-command-desc-clear"),
CREATE_FIXED_MISSING_ARGS("create-fixed-missing-args"),
CREATE_FIXED_INVALID_COORDS("create-fixed-invalid-coords"),
CREATE_FIXED_OUT_OF_RANGE("create-fixed-out-of-range"),
CREATE_FIXED_INVALID_EFFECT("create-fixed-invalid-effect"),
CREATE_FIXED_NO_PERMISSION_EFFECT("create-fixed-no-permission-effect"),
CREATE_FIXED_INVALID_STYLE("create-fixed-invalid-style"),
CREATE_FIXED_NO_PERMISSION_STYLE("create-fixed-no-permission-style"),
CREATE_FIXED_NON_FIXABLE_STYLE("create-fixed-non-fixable-style"),
CREATE_FIXED_DATA_ERROR("create-fixed-data-error"),
CREATE_FIXED_SUCCESS("create-fixed-success"),
REMOVE_FIXED_NONEXISTANT("remove-fixed-nonexistant"),
REMOVE_FIXED_NO_ARGS("remove-fixed-no-args"),
REMOVE_FIXED_INVALID_ARGS("remove-fixed-invalid-args"),
REMOVE_FIXED_SUCCESS("remove-fixed-success"),
LIST_FIXED_SUCCESS("list-fixed-success"),
LIST_FIXED_NONE("list-fixed-none"),
INFO_FIXED_NONEXISTANT("info-fixed-nonexistant"),
INFO_FIXED_NO_ARGS("info-fixed-no-args"),
INFO_FIXED_INVALID_ARGS("info-fixed-invalid-args"),
INFO_FIXED_INFO("info-fixed-info"),
CLEAR_FIXED_NO_PERMISSION("clear-no-permission"),
CLEAR_FIXED_NO_ARGS("clear-no-args"),
CLEAR_FIXED_INVALID_ARGS("clear-invalid-args"),
CLEAR_FIXED_SUCCESS("clear-success"),
NO_PERMISSION_FIXED("no-permission-fixed"),
MAX_FIXED_EFFECTS_REACHED("max-fixed-effects-reached"),
INVALID_FIXED_COMMAND("invalid-fixed-command"),
FIXED_CREATE_MISSING_ARGS,
FIXED_CREATE_INVALID_COORDS,
FIXED_CREATE_OUT_OF_RANGE,
FIXED_CREATE_EFFECT_INVALID,
FIXED_CREATE_EFFECT_NO_PERMISSION,
FIXED_CREATE_STYLE_INVALID,
FIXED_CREATE_STYLE_NO_PERMISSION,
FIXED_CREATE_STYLE_NON_FIXABLE,
FIXED_CREATE_DATA_ERROR,
FIXED_CREATE_SUCCESS,
FIXED_REMOVE_INVALID,
FIXED_REMOVE_NO_ARGS,
FIXED_REMOVE_ARGS_INVALID,
FIXED_REMOVE_SUCCESS,
FIXED_LIST_NONE,
FIXED_LIST_SUCCESS,
FIXED_INFO_INVALID,
FIXED_INFO_NO_ARGS,
FIXED_INFO_INVALID_ARGS,
FIXED_INFO_SUCCESS,
FIXED_CLEAR_NO_PERMISSION,
FIXED_CLEAR_NO_ARGS,
FIXED_CLEAR_INVALID_ARGS,
FIXED_CLEAR_SUCCESS,
FIXED_NO_PERMISSION,
FIXED_MAX_REACHED,
FIXED_INVALID_COMMAND,
// GUI
GUI_DISABLED("gui-disabled"),
GUI_BY_DEFAULT("gui-by-default"),
GUI_BACK_BUTTON("gui-back-button"),
GUI_ICON_NAME_COLOR("gui-icon-name-color"),
GUI_ICON_CURRENT_ACTIVE("gui-icon-current-active"),
GUI_ICON_SETS_TO("gui-icon-sets-to"),
GUI_ICON_SET_YOUR("gui-icon-set-your"),
GUI_NO_ACCESS_TO("gui-no-access-to"),
GUI_NO_DATA("gui-no-data"),
GUI_DISABLED,
GUI_BY_DEFAULT,
GUI_BACK_BUTTON,
GUI_ICON_NAME_COLOR,
GUI_ICON_CURRENT_ACTIVE,
GUI_ICON_SETS_TO,
GUI_ICON_SET_YOUR,
GUI_NO_ACCESS_TO,
GUI_NO_DATA;
// Prefixes
USE("use"),
USAGE("usage"),
RESET("reset"),
// Other
INVALID_ARGUMENTS("invalid-arguments"),
AVAILABLE_COMMANDS("available-commands"),
DISABLED_WORLDS_NONE("disabled-worlds-none"),
DISABLED_WORLDS("disabled-worlds"),
COMMAND_USAGE("command-usage"),
EXECUTED_FOR_PLAYER("executed-for-player"),
FAILED_EXECUTE_NOT_FOUND("failed-execute-not-found"),
FAILED_EXECUTE_NO_PERMISSION("failed-execute-no-permission");
private String fileLocation;
private String message;
private Lang(String fileLocation) {
this.fileLocation = fileLocation;
private String getConfigName() {
return this.name().toLowerCase().replaceAll("_", "-");
}
/**
@ -145,10 +144,11 @@ public class LangManager {
* @param langFile The lang file to pull the message from
*/
private void setMessage(YamlConfiguration langFile) {
String langMessage = langFile.getString(this.fileLocation);
String fileLocation = this.getConfigName();
String langMessage = langFile.getString(fileLocation);
if (langMessage == null) {
langMessage = "&cMissing message in " + langFileName + ": " + this.fileLocation + ". Contact a server administrator.";
PlayerParticles.getPlugin().getLogger().warning("Missing message in " + langFileName + ": " + this.fileLocation);
langMessage = "&cMissing message in " + langFileName + ": " + fileLocation + ". Contact a server administrator.";
PlayerParticles.getPlugin().getLogger().warning("Missing message in " + langFileName + ": " + fileLocation);
}
this.message = parseColors(langMessage);
}

View file

@ -8,363 +8,113 @@
# * This file will be overridden almost every plugin update! #
# ================================================================ #
# ------------- #
# Particles #
# ------------- #
# No Particle Permission
# Default: '&cYou do not have permission to use &b{TYPE} &cparticles!'
no-permission: '&cYou do not have permission to use &b{TYPE} &cparticles!'
# /pp list No Particles
# Default: '&cYou do not have permission to use any particles!'
no-particles: '&cYou do not have permission to use any particles!'
# Now Using Particles
# Default: '&aNow using &b{TYPE} &aparticles!'
now-using: '&aNow using &b{TYPE} &aparticles!'
# Cleared Particles
# Default: '&aYour particles have been cleared!'
cleared-particles: '&aYour particles have been cleared!'
# Invalid Effect Type
# Default: '&cThe effect type {TYPE} does not exist. Use &b/pp effects&c for a list of effects you can use.'
invalid-effect: '&cThe effect type {TYPE} does not exist. Use &b/pp effects&c for a list of effects you can use.'
# Particle Command Usage
# You should not change the text here, only the coloring
# Default: '&b/pp effect <type>'
particle-usage: '&b/pp effect <type>'
# -------------- #
# Styles #
# -------------- #
# No Style Permission
# Default: '&cYou do not have permission to use the style type &b{TYPE}&c!'
no-permission-style: '&cYou do not have permission to use the style type &b{TYPE}&c!'
# /pp styles No Styles
# Default: '&cYou do not have permission to use any styles!'
no-styles: '&cYou do not have permission to use any styles!'
# Now Using Style
# Default: '&aNow using the style type &b{TYPE}&a!'
now-using-style: '&aNow using the style type &b{TYPE}&a!'
# Cleared Style
# Default: '&aYour style has been cleared!'
cleared-style: '&aYour style has been cleared!'
# Invalid Style Type
# Default: '&cInvalid style type! &b/pp styles &c| &b/pp style <type>'
invalid-type-style: '&cInvalid style type! &b/pp styles &c| &b/pp style <type>'
# Style Command Usage
# You should not change the text here, only the coloring
# Default: '&b/pp style <type>'
style-usage: '&b/pp style <type>'
# ------------ #
# Data #
# ------------ #
# Data Usage
# Default: '&eYour current effect requires &b{TYPE} &edata!'
data-usage: '&eYour current effect requires &b{TYPE} &edata!'
# No Data Required
# Default: '&eYour current effect does not use any data!'
no-data-usage: '&eYour current effect does not use any data!'
# Data Applied
# Default: '&aYour &b{TYPE} &adata has been applied!'
data-applied: '&aYour &b{TYPE} &adata has been applied!'
# Invalid Data Arguments
# Default: '&cInvalid &b{TYPE} &cdata arguments!'
data-invalid-arguments: '&cInvalid &b{TYPE} &cdata arguments!'
# Unknown Material
# Default: '&cThe {TYPE} name you supplied is invalid!'
data-material-unknown: '&cThe &b{TYPE} &cname you supplied is invalid!'
# Mismatched Material
# Default: '&cThe material supplied is not of type &b{TYPE}&c!'
data-material-mismatch: '&cThe material supplied is not of type &b{TYPE}&c!'
# Note Data Usage
# You should not change the text here, only the coloring
# Default: '&b/pp data [<0-23>]|[rainbow]'
note-data-usage: '&b/pp data [<0-23>]|[rainbow]'
# Color Data Usage
# You should not change the text here, only the coloring
# Default: '&b/pp data [<0-255> <0-255> <0-255>]|[rainbow]'
color-data-usage: '&b/pp data [<0-255> <0-255> <0-255>]|[rainbow]'
# Item Data Usage
# You should not change the text here, only the coloring
# Default: '&b/pp data <itemName/ID>'
item-data-usage: '&b/pp data <itemName>'
# Block Data Usage
# You should not change the text here, only the coloring
# Default: '&b/pp data <blockName/ID>'
block-data-usage: '&b/pp data <blockName>'
# ---------------- #
# Prefixes #
# ---------------- #
# You Can Use Particles
# Default: '&eYou can use:'
use: '&eYou can use:&b'
# Usage
# Default: '&eUsage:'
usage: '&eUsage:'
# Available Commands
# Default: '&eAvailable commands: &beffect, effects, style, styles, data, fixed, reset, gui, worlds, version, help'
available-commands: '&eAvailable commands: &beffect, effects, style, styles, data, fixed, reset, gui, worlds, version, help'
# Disabled Worlds
# Default: '&eParticles are disabled in these worlds:&b'
disabled-worlds: '&eParticles are disabled in these worlds:&b'
# ------------------ #
# Alt. Execution
# ------------------ #
# Executed For Player
# Default: '&aCommand executed for &b{TYPE}'
executed-for-player: '&aCommand executed for &b{TYPE}'
# Failed Execute Not Found
# Default: '&cFailed to execute command for &b{TYPE}&c! Player not found!'
failed-execute-not-found: '&cFailed to execute command for &b{TYPE}&c! Player not found!'
# Failed Execute No Permission
# Default: '&cFailed to execute command for &b{TYPE}&c! You do not have permission!'
failed-execute-no-permission: '&cFailed to execute command for &b{TYPE}&c! You do not have permission!'
# ----------------- #
# Fixed Effects
# ----------------- #
# -- Create -- #
# Missing Creation Arguments
# Default: '&cUnable to create fixed effect, you are missing &b{TYPE} &crequired arguments!'
create-fixed-missing-args: '&cUnable to create fixed effect, you are missing &b{TYPE} &crequired arguments!'
# Invalid Coordinates
# Default: '&cUnable to create fixed effect, one or more coordinates you entered is invalid!'
create-fixed-invalid-coords: '&cUnable to create fixed effect, one or more coordinates you entered is invalid!'
# Coords Out Of Range
# Default: '&cUnable to create fixed effect, you must be within &b{TYPE}&c blocks of your desired location!'
create-fixed-out-of-range: '&cUnable to create fixed effect, you must be within &b{TYPE}&c blocks of your desired location!'
# Invalid Effect
# Default: '&cUnable to create fixed effect, an effect with the name &b{TYPE} &cdoes not exist!'
create-fixed-invalid-effect: '&cUnable to create fixed effect, an effect with the name &b{TYPE} &cdoes not exist!'
# No Permission Effect
# Default: '&cUnable to create fixed effect, you do not have permission to use the effect &b{TYPE}&c!'
create-fixed-no-permission-effect: '&cUnable to create fixed effect, you do not have permission to use the effect &b{TYPE}&c!'
# Invalid Style
# Default: '&cUnable to create fixed effect, a style with the name &b{TYPE} &cdoes not exist!'
create-fixed-invalid-style: '&cUnable to create fixed effect, a style with the name &b{TYPE} &cdoes not exist!'
# No Permission Style
# Default: '&cUnable to create fixed effect, you do not have permission to use the style &b{TYPE}&c!'
create-fixed-no-permission-style: '&cUnable to create fixed effect, you do not have permission to use the style &b{TYPE}&c!'
# Style Not Fixable
# Default: '&cThe style &b{TYPE} &cprovided can not be used in fixed effects!'
create-fixed-non-fixable-style: '&cThe style &b{TYPE} &ccan not be used in fixed effects!'
# Data Error
# Default: '&cUnable to create fixed effect, the data provided is not correct! This effect requires &b{TYPE}&c!'
create-fixed-data-error: '&cUnable to create fixed effect, the data provided is not correct! This effect requires &b{TYPE}&c data!'
# Creation Success
# Default: '&aYour fixed effect has been created!'
create-fixed-success: '&aYour fixed effect has been created!'
# -- Remove -- #
# Could Not Remove
# Default: '&cUnable to remove, you do not have a fixed effect with the id of &b{TYPE}&c!'
remove-fixed-nonexistant: '&cUnable to remove, you do not have a fixed effect with the id of &b{TYPE}&c!'
# No Args Remove
# Default: '&cYou did not specify an id to remove!'
remove-fixed-no-args: '&cYou did not specify an id to remove!'
# Invalid Args Remove
# Default: '&cUnable to remove, the id specified must be a number!'
remove-fixed-invalid-args: '&cUnable to remove, the id specified must be a number!'
# Effect Removed
# Default: '&aYour fixed effect with the id &b{TYPE}&a has been removed!'
remove-fixed-success: '&aYour fixed effect with the id &b{TYPE}&a has been removed!'
# -- List -- #
# List Success
# Default: '&eYou have fixed effects with these ids: &b'
list-fixed-success: '&eYou have fixed effects with these ids: &b'
# List None
# Default: '&eYou do not have any fixed effects!'
list-fixed-none: '&eYou do not have any fixed effects!'
# -- Info -- #
# Could Not Get Info
# Default: '&cUnable to get info, you do not have a fixed effect with the id of &b{TYPE}&c!'
info-fixed-nonexistant: '&cUnable to get info, you do not have a fixed effect with the id of &b{TYPE}&c!'
# No Args Info
# Default: '&cYou did not specify an id to display info for!'
info-fixed-no-args: '&cYou did not specify an id to display info for!'
# Invalid Args Info
# Default: '&cUnable to get info, the id specified must be a number!'
info-fixed-invalid-args: '&cUnable to get info, the id specified must be a number!'
# Fixed Effect Info
# Key:
# {0} = ID
# {1} = World Name
# {2} = World X Position
# {3} = World Y Position
# {4} = World Z Position
# {5} = Effect Name
# {6} = Style Name
# {7} = Data
# Default: '&eID: &b{0} &eWorld: &b{1} &eX: &b{2} &eY: &b{3} &eZ: &b{4} &eEffect: &b{5} &eStyle: &b{6} &eData: &b{7}'
info-fixed-info: '&eID: &b{0} &eWorld: &b{1} &eX: &b{2} &eY: &b{3} &eZ: &b{4} &eEffect: &b{5} &eStyle: &b{6} &eData: &b{7}'
# -- Clear -- #
# No Permission Clear
# Default: '&cYou do not have permission to clear fixed effects of other players!'
clear-no-permission: '&cYou do not have permission to clear fixed effects of other players!'
# No Arguments Clear
# Default: '&cYou did not provide a radius to clear fixed effects for!'
clear-no-args: '&cYou did not provide a radius to clear fixed effects for!'
# Invalid Arguments Clear
# Default: '&cThe radius you provided is invalid. Make sure it is a positive whole number!'
clear-invalid-args: '&cThe radius you provided is invalid. Make sure it is a positive whole number!'
# Successfully Cleared
# Key:
# {0} = Number of effects cleared
# {1} = The provided radius
# Default: '&aCleared &b{0} &afixed effects within &b{1} &ablocks of your location!'
clear-success: '&aCleared &b{0} &afixed effects within &b{1} &ablocks of your location!'
# -- Other -- #
# No Permission Fixed
# Default: '&cYou do not have permission to use fixed effects!'
no-permission-fixed: '&cYou do not have permission to use fixed effects!'
# Reached Max Allowed
# Default: '&cYou have reached the maximum allowed fixed effects!'
max-fixed-effects-reached: '&cYou have reached the maximum allowed fixed effects!'
# Invalid Fixed Command
# Default: '&cInvalid sub-command for &b/pp fixed&c!'
invalid-fixed-command: '&cInvalid subcommand for &b/pp fixed&c! &eCommands: '
# -- Command Descriptions -- #
# Fixed Command Description For Create
# Default '&e/pp fixed create <x> <y> <z> <effect> <style> [data]'
fixed-command-desc-create: '&e/pp fixed create <x> <y> <z> <effect> <style> [data] - Creates a new fixed effect'
# Fixed Command Description For Remove
# Default: '&e/pp fixed remove <id>'
fixed-command-desc-remove: '&e/pp fixed remove <id> - Removes a fixed effect by its id'
# Fixed Command Description For List
# Default: '&e/pp fixed list - Lists all ids of your fixed effects'
fixed-command-desc-list: '&e/pp fixed list - Lists all ids of your fixed effects'
# Fixed Command Description For Information
# Default: '&e/pp fixed info <id> - Gets info on one of your fixed effects'
fixed-command-desc-info: '&e/pp fixed info <id> - Gets info on one of your fixed effects'
# Fixed Command Description For Clear
# Default: '&e/pp fixed clear <radius> - Clears all fixed effects of all players within the given radius'
fixed-command-desc-clear: '&e/pp fixed clear <radius> - Clears all fixed effects of all players within the given radius'
# ------------- #
# GUI #
# ------------- #
# Disabled
# Default: '&cThe server administrator has disabled the GUI.'
gui-disabled: '&cThe server administrator has disabled the GUI.'
# Opened By Default
# Default: '&eWe opened the GUI for you because you did not specify a command. View other commands with &b/pp help&e or use &b/pp gui&e to avoid this message.'
gui-by-default: '&eWe opened the GUI for you because you did not specify a command. View other commands with &b/pp help&e or use &b/pp gui&e to avoid this message.'
# Back Button
# Default: '&eGo Back'
gui-back-button: '&eGo Back'
# Icon Name Color
# Default: '&a'
gui-icon-name-color: '&a'
# Currently Active Effect/Style
# Default: '&d- Your current {TYPE} -'
gui-icon-current-active: '&d- Your current {TYPE} -'
# Sets your style/effect to {effect name}
# The effect/style name will be added to the end
# Default: '&eSets your {TYPE} to '
gui-icon-sets-to: '&eSets your {TYPE} to &b'
# Select Your
# Default: '&eSelect your {TYPE}'
gui-icon-set-your: '&eSelect your {TYPE}'
# No Access To
# Default: '&cYou have no access to any {TYPE}!'
gui-no-access-to: '&cYou have no access to any {TYPE}!'
# No Data
# Default: '&cYour effect does not use any data!'
gui-no-data: '&cYour effect does not use any data!'
# ------------- #
# Other #
# ------------- #
# Reset
# Default: '&aYour effect, style, and data have all been reset!'
reset: '&aYour effect, style, and data have all been reset!'
# Invalid Arguments
# Default: '&cInvalid arguments! &a/pp help'
invalid-arguments: '&cInvalid arguments! &b/pp help'
# Disabled Worlds None
# Default: '&eParticles are not disabled in any worlds!'
# Command Errors
command-error-no-effects: '&cYou must have access to effects to use this command.'
command-error-unknown: '&cUnknown command, use &b/pp help &cfor a list of commands.'
# Command Descriptions
command-description-add: 'Add a particle to your active particles'
command-description-data: 'Check what type of data an effect uses'
command-description-default: 'The main command. By default, opens the GUI.'
command-description-edit: 'Edit the effect, style, or data of an active particle'
command-description-effect: 'This command has been removed, use /pp help to find new commands'
command-description-effects: 'Display a list of effects you can use'
command-description-fixed: 'Create, edit, and remove fixed particle effects'
command-description-group: 'Save, load, and remove your particle groups'
command-description-gui: 'Display the GUI for easy editing of particles'
command-description-help: 'Displays the help menu... You have arrived.'
command-description-info: 'Gets the description of one of your active particles'
command-description-list: 'Lists the ids of your active particles'
command-description-remove: 'Removes one of your active particles'
command-description-reset: 'Removes all your active particles'
command-description-style: 'This command has been removed, use /pp help to find new commands'
command-description-styles: 'Display a list of styles you can use'
command-description-version: 'Display the current version of the plugin and the author'
command-description-worlds: 'Find out what worlds PlayerParticles is disabled in'
# Sub-Command Usage
command-description-fixed-create: '/pp fixed create <x> <y> <z> <effect> <style> [data] - Creates a new fixed effect'
command-description-fixed-remove: '/pp fixed remove <id> - Removes a fixed effect by its id'
command-description-fixed-list: '/pp fixed list - Lists all ids of your fixed effects'
command-description-fixed-info: '/pp fixed info <id> - Gets info on one of your fixed effects'
command-description-fixed-clear: '/pp fixed clear <radius> - Clears all fixed effects of all players within the given radius'
command-description-group-save: '/pp group save <name> - Saves all currently applied particles under a given name'
command-description-group-load: '/pp group load <name> - Loads all particles saved under a given name'
command-description-group-remove: '/pp group remove <name> - Removes all particles saved under a given name'
# Effects
effect-no-permission: '&cYou do not have permission to use the effect &b{0} &c!'
effect-invalid: '&cThe effect &b{0} &cdoes not exist. Use &b/pp effects &cfor a list of effects you can use.'
effect-list: '&eYou can use the following effects: &b{0}'
# Styles
style-no-permission: '&cYou do not have permission to use the style &b{0} &c!'
style-invalid: '&cThe style &b{0} &cdoes not exist. Use &b/pp styles &cfor a list of styles you can use.'
style-list: '&eYou can use the following styles: &b{0}'
# Data
data-usage-none: '&eYour current effect does not use any data!'
data-usage-block: '&eThe effect &b{0} requires &bblock &edata! &bFormat: <blockMaterialName>'
data-usage-item: '&eThe effect &b{0} requires &bitem &edata! &bFormat: <itemMaterialName>'
data-usage-color: '&eThe effect &b{0} requires &bcolor &edata! &bFormat: [<0-255> <0-255> <0-255>]|[<rainbow>]'
data-usage-note: '&eThe effect &b{0} requires &bnote &edata! &bFormat: <0-23>/<rainbow>'
data-invalid-block: '&cThe &bblock &cdata you entered is invalid! &bFormat: <blockMaterialName>'
data-invalid-item: '&cThe &bitem &cdata you entered is invalid! &bFormat: <itemMaterialName>'
data-invalid-color: '&cThe &bcolor &cdata you entered is invalid! &bFormat: [<0-255> <0-255> <0-255>]|[<rainbow>]'
data-invalid-note: '&cThe &bitem &cdata you entered is invalid! &bFormat: <0-23>/<rainbow>'
data-invalid-material-not-item: '&cThe &bitem &cmaterial &b{0} &cyou entered is not an item!'
data-invalid-material-not-block: '&cThe &bblock &cmaterial &b{0} &cyou entered is not a block!'
data-invalid-material-item: '&cThe &bitem &cmaterial &b{0} you entered does not exist!'
data-invalid-material-block: '&cThe &bblock &cmaterial &b{0} you entered does not exist!'
# Worlds
disabled-worlds: '&eParticles are disabled in these worlds: &b{0}'
disabled-worlds-none: '&eParticles are not disabled in any worlds!'
# Command Usage
# Default: '&eCommand Usage: /pp <command>'
command-usage: '&eCommand Usage: &b/pp <command>'
# Alternate Player Command Execution
execute-success: '&aSuccessfully executed &b{0} &aexecuted for &b{1}'
execute-failed-not-found: '&cFailed to execute &b{0} &cfor &b{1}&c! Player not found!'
execute-failed-no-permission: '&cFailed to execute &b{0} for &b{1}&c! You do not have permission!'
# Reset
reset-success: '&aAll your active particles have been removed.'
# Fixed Effects
fixed-create-missing-args: '&cUnable to create fixed effect, you are missing &b{0} &crequired arguments!'
fixed-create-invalid-coords: '&cUnable to create fixed effect, one or more coordinates you entered is invalid!'
fixed-create-out-of-range: '&cUnable to create fixed effect, you must be within &b{0} &cblocks of your desired location!'
fixed-create-effect-invalid: '&cUnable to create fixed effect, an effect with the name &b{0} &cdoes not exist!'
fixed-create-effect-no-permission: '&cUnable to create fixed effect, you do not have permission to use the effect &b{0}&c!'
fixed-create-style-invalid: '&cUnable to create fixed effect, a style with the name &b{0} &cdoes not exist!'
fixed-create-style-no-permission: '&cUnable to create fixed effect, you do not have permission to use the style &b{0}&c!'
fixed-create-style-non-fixable: '&cThe style &b{0} &ccan not be used in fixed effects!'
fixed-create-data-error: '&cUnable to create fixed effect, the data provided is not correct! Use &b/pp data <effect> &cto find the correct data format!'
fixed-create-success: '&aYour fixed effect has been created!'
fixed-remove-invalid: '&cUnable to remove fixed effect, you do not have a fixed effect with the id of &b{0}&c!'
fixed-remove-no-args: '&cYou did not specify an id to remove!'
fixed-remove-args-invalid: '&cUnable to remove, the id specified must be a number!'
fixed-remove-success: '&aYour fixed effect with the id &b{0} &ahas been removed!'
fixed-list-none: '&eYou do not have any fixed effects!'
fixed-list-success: '&eYou have fixed effects with these ids: &b{0}'
fixed-info-invalid: '&cUnable to get info, you do not have a fixed effect with the id of &b{0}&c!'
fixed-info-no-args: '&cYou did not specify an id to display info for!'
fixed-info-invalid-args: '&cUnable to get info, the id specified must be a number!'
fixed-info-success: '&eID: &b{0} &eWorld: &b{1} &eX: &b{2} &eY: &b{3} &eZ: &b{4} &eEffect: &b{5} &eStyle: &b{6} &eData: &b{7}'
fixed-clear-no-permission: '&cYou do not have permission to clear nearby fixed effects!'
fixed-clear-no-args: '&cYou did not provide a radius to clear fixed effects for!'
fixed-clear-invalid-args: '&cThe radius you provided is invalid. Make sure it is a positive whole number!'
fixed-clear-success: '&aCleared &b{0} &afixed effects within &b{1} &ablocks of your location!'
fixed-no-permission: '&cYou do not have permission to use fixed effects!'
fixed-max-reached: '&cYou have reached the maximum allowed fixed effects!'
fixed-invalid-command: '&cInvalid sub-command for &b/pp fixed&c!'
# GUI
gui-disabled: '&cThe server administrator has disabled the GUI.'
gui-by-default: '&eWe opened the GUI for you because you did not specify a command. View other commands with &b/pp help&e or use &b/pp gui&e to avoid this message.'
gui-back-button: '&eGo Back'
gui-icon-name-color: '&a'
gui-icon-current-active: '&d- Your current {0} -'
gui-icon-sets-to: '&eSets your {0} to &b'
gui-icon-set-your: '&eSelect your {0}'
gui-no-access-to: '&cYou have no access to any {0}!'
gui-no-data: '&cYour effect does not use any data!'