diff --git a/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/CreateNodeImpl.java b/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/CreateNodeImpl.java index 64a0f52..ec885cf 100644 --- a/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/CreateNodeImpl.java +++ b/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/CreateNodeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Matt Malec, and the Pterodactyl4J contributors + * Copyright 2021-2024 Matt Malec, and the Pterodactyl4J contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ protected RequestBody finalizeData() { json.put("daemon_listen", daemonListenPort); json.put("daemon_sftp", daemonSFTPPort); json.put("throttle", new JSONObject().put("enabled", throttle)); - json.put("maintenance_mode", hasMaintanceMode ? "1" : "0"); + json.put("maintenance_mode", isInMaintenanceMode ? "1" : "0"); return getRequestBody(json); } } diff --git a/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/EditNodeImpl.java b/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/EditNodeImpl.java index 46adcb0..b0a9217 100644 --- a/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/EditNodeImpl.java +++ b/src/main/java/com/mattmalec/pterodactyl4j/application/entities/impl/EditNodeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Matt Malec, and the Pterodactyl4J contributors + * Copyright 2021-2024 Matt Malec, and the Pterodactyl4J contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,7 +65,9 @@ protected RequestBody finalizeData() { throttle == null ? new JSONObject().put("enabled", false) : new JSONObject().put("enabled", throttle)); json.put( "maintenance_mode", - hasMaintanceMode == null ? (node.hasMaintanceMode() ? "1" : "0") : (hasMaintanceMode ? "1" : "0")); + isInMaintenanceMode == null + ? (node.hasMaintanceMode() ? "1" : "0") + : (isInMaintenanceMode ? "1" : "0")); return getRequestBody(json); } diff --git a/src/main/java/com/mattmalec/pterodactyl4j/application/managers/NodeAction.java b/src/main/java/com/mattmalec/pterodactyl4j/application/managers/NodeAction.java index 00024d3..e49a6f5 100644 --- a/src/main/java/com/mattmalec/pterodactyl4j/application/managers/NodeAction.java +++ b/src/main/java/com/mattmalec/pterodactyl4j/application/managers/NodeAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Matt Malec, and the Pterodactyl4J contributors + * Copyright 2021-2024 Matt Malec, and the Pterodactyl4J contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,5 +66,5 @@ default NodeAction setDiskSpaceOverallocate(long diskSpaceOverallocate) { NodeAction setScheme(boolean secure); - NodeAction setMaintanceMode(boolean hasMaintanceMode); + NodeAction setMaintanceMode(boolean isInMaintenanceMode); } diff --git a/src/main/java/com/mattmalec/pterodactyl4j/requests/action/AbstractNodeAction.java b/src/main/java/com/mattmalec/pterodactyl4j/requests/action/AbstractNodeAction.java index dacad8d..13a9ede 100644 --- a/src/main/java/com/mattmalec/pterodactyl4j/requests/action/AbstractNodeAction.java +++ b/src/main/java/com/mattmalec/pterodactyl4j/requests/action/AbstractNodeAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Matt Malec, and the Pterodactyl4J contributors + * Copyright 2021-2024 Matt Malec, and the Pterodactyl4J contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ public abstract class AbstractNodeAction extends PteroActionImpl implement protected String daemonListenPort; protected Boolean throttle; protected Boolean secure; - protected Boolean hasMaintanceMode; + protected Boolean isInMaintenanceMode; public AbstractNodeAction(PteroApplicationImpl impl, Route.CompiledRoute route) { super(impl.getP4J(), route, (response, request) -> new NodeImpl(response.getObject(), impl)); @@ -131,8 +131,8 @@ public NodeAction setScheme(boolean secure) { } @Override - public NodeAction setMaintanceMode(boolean hasMaintanceMode) { - this.hasMaintanceMode = hasMaintanceMode; + public NodeAction setMaintanceMode(boolean isInMaintenanceMode) { + this.isInMaintenanceMode = isInMaintenanceMode; return this; } }