mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-30 03:51:19 +01:00
Changed DoubleFlag and IntegerFlag to take java.lang.Number objects in unmarshal().
This commit is contained in:
parent
ecb87efe8d
commit
977c7d2f29
@ -52,6 +52,8 @@ public Double parseInput(WorldGuardPlugin plugin, CommandSender sender,
|
||||
public Double unmarshal(Object o) {
|
||||
if (o instanceof Double) {
|
||||
return (Double) o;
|
||||
} else if (o instanceof Number) {
|
||||
return ((Number) o).doubleValue();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ public Integer parseInput(WorldGuardPlugin plugin, CommandSender sender,
|
||||
public Integer unmarshal(Object o) {
|
||||
if (o instanceof Integer) {
|
||||
return (Integer) o;
|
||||
} else if (o instanceof Number) {
|
||||
return ((Number) o).intValue();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user