diff --git a/src/com/p3achb0t/api/wrappers/ClientMode.kt b/src/com/p3achb0t/api/wrappers/ClientMode.kt index 0dd07450..0c9ad70c 100644 --- a/src/com/p3achb0t/api/wrappers/ClientMode.kt +++ b/src/com/p3achb0t/api/wrappers/ClientMode.kt @@ -15,27 +15,10 @@ class ClientMode(val ctx: Context) { var modeType: ModeType = ModeType.ResizeMode fun getMode(): ModeType { - - if (modeInit) return modeType - return try { - val resizeModeWidget = ctx.widgets.find(261, 34) - // For tutorial island we might not have any children yet, then it means we are in resize mode - if (resizeModeWidget?.getChildren() == null) { - modeInit = true - modeType = Companion.ModeType.ResizeMode - return modeType - } - if (resizeModeWidget.getChildren()[0].getSpriteId2() == 1150) { - modeInit = true - modeType = Companion.ModeType.ResizeMode - modeType - } else { - modeInit = true - modeType = Companion.ModeType.FixedMode - modeType - } - } catch (e: Exception) { - modeType + return if(ctx.client.getClientPreferences().getWindowMode() == 1){ + ModeType.FixedMode + }else{ + ModeType.ResizeMode } } } \ No newline at end of file