mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-07-23 22:14:10 +00:00
Add new color/note data 'random', Apply max particle creation limit in GUI
This commit is contained in:
parent
b1e23b6812
commit
721f500d9b
15 changed files with 161 additions and 834 deletions
|
@ -145,6 +145,8 @@ public class EditCommandModule implements CommandModule {
|
|||
if (effect == ParticleEffect.NOTE) {
|
||||
if (args[0].equalsIgnoreCase("rainbow")) {
|
||||
noteColorData = new NoteColor(99);
|
||||
} else if (args[0].equalsIgnoreCase("random")) {
|
||||
noteColorData = new NoteColor(98);
|
||||
} else {
|
||||
int note = -1;
|
||||
try {
|
||||
|
@ -164,6 +166,8 @@ public class EditCommandModule implements CommandModule {
|
|||
} else {
|
||||
if (args[0].equalsIgnoreCase("rainbow")) {
|
||||
colorData = new OrdinaryColor(999, 999, 999);
|
||||
} else if (args[0].equalsIgnoreCase("random")) {
|
||||
colorData = new OrdinaryColor(998, 998, 998);
|
||||
} else {
|
||||
int r = -1;
|
||||
int g = -1;
|
||||
|
@ -267,17 +271,19 @@ public class EditCommandModule implements CommandModule {
|
|||
if (args.length == 3) {
|
||||
possibleValues.add("<0-24>");
|
||||
possibleValues.add("rainbow");
|
||||
possibleValues.add("random");
|
||||
}
|
||||
} else { // Color data
|
||||
if (args.length <= 5 && !args[2].equalsIgnoreCase("rainbow")) {
|
||||
if (args.length <= 5 && !args[2].equalsIgnoreCase("rainbow") && !args[2].equalsIgnoreCase("random")) {
|
||||
possibleValues.add("<0-255>");
|
||||
}
|
||||
if (args.length <= 4 && !args[2].equalsIgnoreCase("rainbow")) {
|
||||
if (args.length <= 4 && !args[2].equalsIgnoreCase("rainbow") && !args[2].equalsIgnoreCase("random")) {
|
||||
possibleValues.add("<0-255> <0-255>");
|
||||
}
|
||||
if (args.length <= 3) {
|
||||
possibleValues.add("<0-255> <0-255> <0-255>");
|
||||
possibleValues.add("rainbow");
|
||||
possibleValues.add("random");
|
||||
}
|
||||
}
|
||||
StringUtil.copyPartialMatches(args[args.length - 1], possibleValues, matches);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue