mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
Added argument validation in SetLineCMD to prevent index errors (#155)
This commit is contained in:
@@ -76,6 +76,11 @@ public class SetLineCMD implements Subcommand {
|
|||||||
|
|
||||||
index--;
|
index--;
|
||||||
|
|
||||||
|
if (args.length < 5) {
|
||||||
|
MessageHelper.error(player, "Please provide text for the line");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
String text = "";
|
String text = "";
|
||||||
for (int i = 4; i < args.length; i++) {
|
for (int i = 4; i < args.length; i++) {
|
||||||
text += args[i] + " ";
|
text += args[i] + " ";
|
||||||
|
|||||||
Reference in New Issue
Block a user