mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2025-02-16 03:21:21 +01:00
* BUG: Fix the "resize" argument of the /tomap command (fixes #6).
This commit is contained in:
parent
2da29a297c
commit
f7d9a07a58
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user