mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixed errors :D
This commit is contained in:
parent
5b62523003
commit
2dc935eed6
@ -139,6 +139,7 @@ public enum C {
|
|||||||
*/
|
*/
|
||||||
NOT_VALID_SUBCOMMAND("&cThat is not a valid subcommand"),
|
NOT_VALID_SUBCOMMAND("&cThat is not a valid subcommand"),
|
||||||
DID_YOU_MEAN("&cDid you mean: &6%s"),
|
DID_YOU_MEAN("&cDid you mean: &6%s"),
|
||||||
|
NAME_LITTLE("&c%s name is too short, &6%s&c<&6%s"),
|
||||||
NO_COMMANDS("&cI'm sorry, but you're not permitted to use any subcommands."),
|
NO_COMMANDS("&cI'm sorry, but you're not permitted to use any subcommands."),
|
||||||
SUBCOMMAND_SET_OPTIONS_HEADER("&cPossible Values: "),
|
SUBCOMMAND_SET_OPTIONS_HEADER("&cPossible Values: "),
|
||||||
/*
|
/*
|
||||||
|
@ -159,6 +159,7 @@ public class MainCommand implements CommandExecutor, TabCompleter {
|
|||||||
if(!(commandSender instanceof Player)) return null;
|
if(!(commandSender instanceof Player)) return null;
|
||||||
Player player = (Player) commandSender;
|
Player player = (Player) commandSender;
|
||||||
ArrayList<SubCommand> subo = subCommands;
|
ArrayList<SubCommand> subo = subCommands;
|
||||||
|
if(strings.length < 1 || strings[0].length() < 2) return null;
|
||||||
while(true) {
|
while(true) {
|
||||||
String sub = new StringComparsion(strings[0], subo.toArray()).getBestMatch();
|
String sub = new StringComparsion(strings[0], subo.toArray()).getBestMatch();
|
||||||
if(subo.isEmpty())
|
if(subo.isEmpty())
|
||||||
|
@ -217,6 +217,10 @@ public class Set extends SubCommand {
|
|||||||
PlayerFunctions.sendMessage(plr, C.NEED_BIOME);
|
PlayerFunctions.sendMessage(plr, C.NEED_BIOME);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(args[1].length() < 2) {
|
||||||
|
sendMessage(plr, C.NAME_LITTLE, "Biome", args[1].length() + "", "2");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Biome biome = Biome.valueOf(new StringComparsion(args[1], Biome.values()).getBestMatch());
|
Biome biome = Biome.valueOf(new StringComparsion(args[1], Biome.values()).getBestMatch());
|
||||||
/*for (Biome b : Biome.values()) {
|
/*for (Biome b : Biome.values()) {
|
||||||
if (b.toString().equalsIgnoreCase(args[1])) {
|
if (b.toString().equalsIgnoreCase(args[1])) {
|
||||||
@ -243,6 +247,10 @@ public class Set extends SubCommand {
|
|||||||
PlayerFunctions.sendMessage(plr, C.NEED_BLOCK);
|
PlayerFunctions.sendMessage(plr, C.NEED_BLOCK);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(args[1].length() < 2) {
|
||||||
|
sendMessage(plr, C.NAME_LITTLE, "Material", args[1].length() + "", "2");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Material material = getMaterial(args[1], PlotWorld.BLOCKS);
|
Material material = getMaterial(args[1], PlotWorld.BLOCKS);
|
||||||
/*for (Material m : PlotWorld.BLOCKS) {
|
/*for (Material m : PlotWorld.BLOCKS) {
|
||||||
if (m.toString().equalsIgnoreCase(args[1])) {
|
if (m.toString().equalsIgnoreCase(args[1])) {
|
||||||
@ -297,6 +305,10 @@ public class Set extends SubCommand {
|
|||||||
s = s.replaceAll(",", "");
|
s = s.replaceAll(",", "");
|
||||||
String[] ss = s.split(";");
|
String[] ss = s.split(";");
|
||||||
ss[0] = ss[0].replaceAll(";", "");
|
ss[0] = ss[0].replaceAll(";", "");
|
||||||
|
if(ss[0].length() < 2) {
|
||||||
|
sendMessage(plr, C.NAME_LITTLE, "Material", ss[0].length() + "", "2");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
m = getMaterial(ss[0], materials);
|
m = getMaterial(ss[0], materials);
|
||||||
/*for (Material ma : materials) {
|
/*for (Material ma : materials) {
|
||||||
if (ma.toString().equalsIgnoreCase(ss[0])) {
|
if (ma.toString().equalsIgnoreCase(ss[0])) {
|
||||||
@ -336,6 +348,10 @@ public class Set extends SubCommand {
|
|||||||
PlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT_WORLD);
|
PlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT_WORLD);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(args[1].length() < 2) {
|
||||||
|
sendMessage(plr, C.NAME_LITTLE, "Material", args[1].length() + "", "2");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Material material = getMaterial(args[1], PlotWorld.BLOCKS);
|
Material material = getMaterial(args[1], PlotWorld.BLOCKS);
|
||||||
/*for (Material m : PlotWorld.BLOCKS) {
|
/*for (Material m : PlotWorld.BLOCKS) {
|
||||||
if (m.toString().equalsIgnoreCase(args[1])) {
|
if (m.toString().equalsIgnoreCase(args[1])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user