mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-05 23:33: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--;
|
||||
|
||||
if (args.length < 5) {
|
||||
MessageHelper.error(player, "Please provide text for the line");
|
||||
return false;
|
||||
}
|
||||
|
||||
String text = "";
|
||||
for (int i = 4; i < args.length; i++) {
|
||||
text += args[i] + " ";
|
||||
|
||||
Reference in New Issue
Block a user