Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Properly escape cuipattern
Dieser Commit ist enthalten in:
Ursprung
49678720c6
Commit
ffa2824c4d
@ -47,7 +47,7 @@ public class WorldEditListener implements Listener {
|
|||||||
|
|
||||||
private WorldEditPlugin plugin;
|
private WorldEditPlugin plugin;
|
||||||
private boolean ignoreLeftClickAir = false;
|
private boolean ignoreLeftClickAir = false;
|
||||||
private final static Pattern cuipattern = Pattern.compile("u00a74u00a75u00a73u00a74([^|]*)\\|?(.*)");
|
private final static Pattern cuipattern = Pattern.compile("u00a74u00a75u00a73u00a74([^\\|]*)\\|?(.*)");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player plays an animation, such as an arm swing
|
* Called when a player plays an animation, such as an arm swing
|
||||||
|
@ -70,8 +70,7 @@ public class SpoutWorld extends LocalWorld {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean setBlockType(Vector pt, int type) {
|
public boolean setBlockType(Vector pt, int type) {
|
||||||
world.setBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short)type, WorldEditPlugin.getInstance());
|
return world.setBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short)type, WorldEditPlugin.getInstance());
|
||||||
return world.getBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()) != type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -95,9 +94,7 @@ public class SpoutWorld extends LocalWorld {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean setTypeIdAndData(Vector pt, int type, int data) {
|
public boolean setTypeIdAndData(Vector pt, int type, int data) {
|
||||||
int origType = getBlockType(pt), origData = getBlockData(pt);
|
return world.setBlockIdAndData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, (short) data, WorldEditPlugin.getInstance());
|
||||||
world.setBlockIdAndData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, (short) data, WorldEditPlugin.getInstance());
|
|
||||||
return origType != type && origData != data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren