3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-10 05:20:04 +01:00

Fixed WORLDEDIT-2707, regex in WorldEdit.getBlockPattern()

Regex in WorldEdit.getBlockPattern() was overly complex.
Dieser Commit ist enthalten in:
Albert Pham 2013-02-25 00:14:17 -08:00
Ursprung c2932cc54f
Commit da6103c33e

Datei anzeigen

@ -671,7 +671,7 @@ public class WorldEdit {
double chance; double chance;
// 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]); chance = Double.parseDouble(p[0]);
block = getBlock(player, p[1]); block = getBlock(player, p[1]);