fixed package mismatch

This commit is contained in:
cs-powell
2024-11-24 15:05:33 -05:00
parent a5cf193a7d
commit 3579efea5d
23 changed files with 135 additions and 79 deletions

View File

@@ -0,0 +1,45 @@
package ModelFiles.XPCdependencies;
import java.net.InetAddress;
public class Beacon {
private InetAddress xplaneAddress;
private int pluginPort;
private String pluginVersion;
private int xPlaneVersion;
public Beacon(InetAddress xplaneAddress, int pluginPort, String pluginVersion, int xPlaneVersion) {
this.xplaneAddress = xplaneAddress;
this.pluginPort = pluginPort;
this.pluginVersion = pluginVersion;
this.xPlaneVersion = xPlaneVersion;
}
public String getHost() {
return xplaneAddress.getHostAddress();
}
public String getPluginVersion() {
return pluginVersion;
}
public String getXplaneVersion() {
return String.format("%.2f", xPlaneVersion / 100.0);
}
public int getPluginPort() {
return pluginPort;
}
public InetAddress getXplaneAddress() {
return xplaneAddress;
}
@Override
public String toString() {
return "host: " + getHost() + ":" + getPluginPort() +" version: " + getPluginVersion() + " X-Plane Version: " + getXplaneVersion();
}
}