mirror of
https://github.com/taoneill/war.git
synced 2025-01-20 22:31:20 +01:00
Closes gh-315. Warhub can now be moved from one world to another properly.
This commit is contained in:
parent
1325611775
commit
4996a7457d
@ -143,6 +143,7 @@ public class WarHub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Block locationBlock = this.location.getWorld().getBlockAt(this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());
|
Block locationBlock = this.location.getWorld().getBlockAt(this.location.getBlockX(), this.location.getBlockY(), this.location.getBlockZ());
|
||||||
|
this.volume.setWorld(this.location.getWorld());
|
||||||
this.volume.setCornerOne(locationBlock.getFace(back).getFace(left, halfHubWidth).getFace(BlockFace.DOWN));
|
this.volume.setCornerOne(locationBlock.getFace(back).getFace(left, halfHubWidth).getFace(BlockFace.DOWN));
|
||||||
this.volume.setCornerTwo(locationBlock.getFace(right, halfHubWidth).getFace(front, hubDepth).getFace(BlockFace.UP, hubHeigth));
|
this.volume.setCornerTwo(locationBlock.getFace(right, halfHubWidth).getFace(front, hubDepth).getFace(BlockFace.UP, hubHeigth));
|
||||||
this.volume.saveBlocks();
|
this.volume.saveBlocks();
|
||||||
|
@ -28,7 +28,7 @@ import com.tommytony.war.jobs.BlockResetJob;
|
|||||||
*/
|
*/
|
||||||
public class Volume {
|
public class Volume {
|
||||||
private final String name;
|
private final String name;
|
||||||
private final World world;
|
private World world;
|
||||||
// private final Warzone warzone;
|
// private final Warzone warzone;
|
||||||
private BlockInfo cornerOne;
|
private BlockInfo cornerOne;
|
||||||
private BlockInfo cornerTwo;
|
private BlockInfo cornerTwo;
|
||||||
@ -45,6 +45,10 @@ public class Volume {
|
|||||||
public World getWorld() {
|
public World getWorld() {
|
||||||
return this.world;
|
return this.world;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWorld(World world) {
|
||||||
|
this.world = world;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean hasTwoCorners() {
|
public boolean hasTwoCorners() {
|
||||||
return this.cornerOne != null && this.cornerTwo != null;
|
return this.cornerOne != null && this.cornerTwo != null;
|
||||||
|
@ -15,7 +15,7 @@ permissions:
|
|||||||
war.build: true
|
war.build: true
|
||||||
war.pvp: true
|
war.pvp: true
|
||||||
war.zonemaker:
|
war.zonemaker:
|
||||||
description: Create and edit warzones, but you only edit a warzone if you are its author.
|
description: Create and edit warzones, but you can only edit a warzone if you are its author.
|
||||||
default: false
|
default: false
|
||||||
children:
|
children:
|
||||||
war.player: true
|
war.player: true
|
||||||
|
@ -15,7 +15,7 @@ permissions:
|
|||||||
war.build: true
|
war.build: true
|
||||||
war.pvp: true
|
war.pvp: true
|
||||||
war.zonemaker:
|
war.zonemaker:
|
||||||
description: Create and edit warzones, but you only edit a warzone if you are its author.
|
description: Create and edit warzones, but you can only edit a warzone if you are its author.
|
||||||
default: false
|
default: false
|
||||||
children:
|
children:
|
||||||
war.player: true
|
war.player: true
|
||||||
|
Loading…
Reference in New Issue
Block a user