geforkt von Mirrors/FastAsyncWorldEdit
Fixed pattern "X%Y" with no Y defined throwing an exception.
Fixes WORLDEDIT-2897.
Dieser Commit ist enthalten in:
Ursprung
513940a80b
Commit
7cf093ad40
@ -713,8 +713,12 @@ public class WorldEdit {
|
|||||||
// Parse special percentage syntax
|
// Parse special percentage syntax
|
||||||
if (s.matches("[0-9]+(\\.[0-9]*)?%.*")) {
|
if (s.matches("[0-9]+(\\.[0-9]*)?%.*")) {
|
||||||
String[] p = s.split("%");
|
String[] p = s.split("%");
|
||||||
chance = Double.parseDouble(p[0]);
|
if (p.length < 2) {
|
||||||
block = getBlock(player, p[1]);
|
throw new UnknownItemException(s);
|
||||||
|
} else {
|
||||||
|
chance = Double.parseDouble(p[0]);
|
||||||
|
block = getBlock(player, p[1]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
chance = 1;
|
chance = 1;
|
||||||
block = getBlock(player, s);
|
block = getBlock(player, s);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren