mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
refactor rename
This commit is contained in:
@@ -50,7 +50,7 @@ public final class Main {
|
|||||||
GuiBase.setInterface(new GuiDesktop());
|
GuiBase.setInterface(new GuiDesktop());
|
||||||
|
|
||||||
//set PropertyConfig log4j to true
|
//set PropertyConfig log4j to true
|
||||||
GuiBase.setpropertyConfig(true);
|
GuiBase.enablePropertyConfig(true);
|
||||||
|
|
||||||
//install our error handler
|
//install our error handler
|
||||||
ExceptionHandler.registerErrorHandling();
|
ExceptionHandler.registerErrorHandling();
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class Forge implements ApplicationListener {
|
|||||||
clipboard = clipboard0;
|
clipboard = clipboard0;
|
||||||
deviceAdapter = deviceAdapter0;
|
deviceAdapter = deviceAdapter0;
|
||||||
GuiBase.setInterface(new GuiMobile(assetDir0));
|
GuiBase.setInterface(new GuiMobile(assetDir0));
|
||||||
GuiBase.setpropertyConfig(value);
|
GuiBase.enablePropertyConfig(value);
|
||||||
}
|
}
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class GuiBase {
|
|||||||
public static void setInterface(IGuiBase i0) {
|
public static void setInterface(IGuiBase i0) {
|
||||||
guiInterface = i0;
|
guiInterface = i0;
|
||||||
}
|
}
|
||||||
public static void setpropertyConfig(boolean value) {
|
public static void enablePropertyConfig(boolean value) {
|
||||||
propertyConfig = value;
|
propertyConfig = value;
|
||||||
}
|
}
|
||||||
public static boolean isNetworkplay() {
|
public static boolean isNetworkplay() {
|
||||||
@@ -22,7 +22,7 @@ public class GuiBase {
|
|||||||
public static void setNetworkplay(boolean value) {
|
public static void setNetworkplay(boolean value) {
|
||||||
networkplay = value;
|
networkplay = value;
|
||||||
}
|
}
|
||||||
public static boolean getpropertyConfig() {
|
public static boolean hasPropertyConfig() {
|
||||||
return propertyConfig;
|
return propertyConfig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class CustomObjectDecoder extends LengthFieldBasedFrameDecoder {
|
|||||||
if (frame == null) {
|
if (frame == null) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
if (GuiBase.getpropertyConfig()){
|
if (GuiBase.hasPropertyConfig()){
|
||||||
ElsaObjectInputStream ois = new ElsaObjectInputStream(new ByteBufInputStream(frame, true));
|
ElsaObjectInputStream ois = new ElsaObjectInputStream(new ByteBufInputStream(frame, true));
|
||||||
|
|
||||||
Object var5;
|
Object var5;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class CustomObjectEncoder extends MessageToByteEncoder<Serializable> {
|
|||||||
int startIdx = out.writerIndex();
|
int startIdx = out.writerIndex();
|
||||||
ByteBufOutputStream bout = new ByteBufOutputStream(out);
|
ByteBufOutputStream bout = new ByteBufOutputStream(out);
|
||||||
|
|
||||||
if (GuiBase.getpropertyConfig()){
|
if (GuiBase.hasPropertyConfig()){
|
||||||
ElsaObjectOutputStream oout = null;
|
ElsaObjectOutputStream oout = null;
|
||||||
try {
|
try {
|
||||||
bout.write(LENGTH_PLACEHOLDER);
|
bout.write(LENGTH_PLACEHOLDER);
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ public enum ProtocolMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void checkArgs(final Object[] args) {
|
public void checkArgs(final Object[] args) {
|
||||||
if (GuiBase.getpropertyConfig())
|
if (GuiBase.hasPropertyConfig())
|
||||||
return; //uses custom serializer for Android 8+..
|
return; //uses custom serializer for Android 8+..
|
||||||
for (int iArg = 0; iArg < args.length; iArg++) {
|
for (int iArg = 0; iArg < args.length; iArg++) {
|
||||||
Object arg = null;
|
Object arg = null;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public final class FServerManager {
|
|||||||
*/
|
*/
|
||||||
public static FServerManager getInstance() {
|
public static FServerManager getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
if(GuiBase.getpropertyConfig())
|
if(GuiBase.hasPropertyConfig())
|
||||||
PropertyConfigurator.configure(ForgeConstants.ASSETS_DIR + "/src/main/resources/log4jConfig.config");
|
PropertyConfigurator.configure(ForgeConstants.ASSETS_DIR + "/src/main/resources/log4jConfig.config");
|
||||||
instance = new FServerManager();
|
instance = new FServerManager();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user