* BUG: Fix the "resize" argument of the /tomap command (fixes #6).

This commit is contained in:
Prokopyl 2015-02-22 23:19:41 +01:00
parent 2da29a297c
commit f7d9a07a58
2 changed files with 9 additions and 6 deletions

View File

@ -62,17 +62,18 @@ public class ImageRenduCommande implements CommandExecutor
return false; return false;
} }
ImageMap.Type type = ImageMap.Type.SINGLE; ImageMap.Type type = ImageMap.Type.POSTER;
if (args.length >= 2) if (args.length >= 2)
{ {
try if(args[1].equals("resize"))
{ {
type = Enum.valueOf(ImageMap.Type.class, args[1]); type = ImageMap.Type.SINGLE;
} }
catch (IllegalArgumentException ex) else
{ {
joueur.sendMessage("Specified map type doesn't exist"); joueur.sendMessage("Invalid argument.");
return true;
} }
} }

View File

@ -34,8 +34,10 @@ public abstract class ImageMap
case "poster": case "poster":
case "multi": case "multi":
return POSTER; return POSTER;
default: case "single":
return SINGLE; return SINGLE;
default:
return null;
} }
} }
} }