mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Fixed for new SpoutAPI version.
This commit is contained in:
parent
483edd76bd
commit
a7c75285d9
@ -70,7 +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);
|
world.setBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short)type, WorldEditPlugin.getInstance());
|
||||||
return world.getBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()) != type;
|
return world.getBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()) != type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,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);
|
int origType = getBlockType(pt), origData = getBlockData(pt);
|
||||||
world.setBlockIdAndData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, (short) data);
|
world.setBlockIdAndData(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, (short) data, WorldEditPlugin.getInstance());
|
||||||
return origType != type && origData != data;
|
return origType != type && origData != data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,11 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
|||||||
*/
|
*/
|
||||||
private YAMLConfiguration config;
|
private YAMLConfiguration config;
|
||||||
|
|
||||||
|
private static WorldEditPlugin instance;
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called on plugin enable.
|
* Called on plugin enable.
|
||||||
*/
|
*/
|
||||||
@ -351,4 +356,8 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return getDescription().getName();
|
return getDescription().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WorldEditPlugin getInstance() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user