mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-05 02:09:48 +01:00
Fix lobby signs. Resolves #398
This commit is contained in:
parent
3829e33e40
commit
e04ad0949f
@ -58,7 +58,7 @@ Maven automatically fetches all dependencies and builds DungeonsXL; just run _bu
|
||||
[DRECommons](https://github.com/DRE2N/DRECommons) is a util library for common tasks. DungeonsXL contains DRECommons 4.1.
|
||||
|
||||
#### Caliburn API
|
||||
[Caliburn](https://github.com/DRE2N/CaliburnAPI) is an API to read custom items and mobs from config files. DungeonsXL contains Caliburn Beta 0.3.
|
||||
[Caliburn](https://github.com/DRE2N/CaliburnAPI) is an API to read custom items and mobs from config files. DungeonsXL contains Caliburn Beta 0.4.
|
||||
|
||||
### Java
|
||||
Make sure that your server uses Java 8 or higher.
|
||||
|
@ -232,6 +232,7 @@ public abstract class DSign {
|
||||
if (!(type instanceof DSignTypeDefault)) {
|
||||
MessageUtil.log("Please note that this sign is an unsupported feature added by an addon!");
|
||||
}
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,12 +29,16 @@ public abstract class LocationSign extends DSign {
|
||||
|
||||
public LocationSign(Sign sign, String[] lines, DGameWorld gameWorld) {
|
||||
super(sign, lines, gameWorld);
|
||||
double x = sign.getX() + 0.5;
|
||||
double y = sign.getY();
|
||||
double z = sign.getZ() + 0.5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
double x = getSign().getX() + 0.5;
|
||||
double y = getSign().getY();
|
||||
double z = getSign().getZ() + 0.5;
|
||||
float yaw = letterToYaw(((org.bukkit.material.Sign) getSign().getData()).getFacing().getOppositeFace().name().charAt(0));
|
||||
float pitch = 0;
|
||||
location = new Location(gameWorld.getWorld(), x, y, z, yaw, pitch);
|
||||
location = new Location(getGameWorld().getWorld(), x, y, z, yaw, pitch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,6 +41,7 @@ public class LobbySign extends LocationSign {
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
super.onInit();
|
||||
getGameWorld().setLobbyLocation(getLocation());
|
||||
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user