From 52382c8a8e7a78fd48f601b2efd63cd1d4ec0f71 Mon Sep 17 00:00:00 2001 From: JKetelaar Date: Wed, 29 Oct 2014 11:13:11 +0100 Subject: [PATCH] Added Game#getSettings and Game#getSetting --- src/org/rev317/min/accessors/Client.java | 2 ++ src/org/rev317/min/api/methods/Game.java | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/org/rev317/min/accessors/Client.java b/src/org/rev317/min/accessors/Client.java index e6cff3d..f0062ed 100644 --- a/src/org/rev317/min/accessors/Client.java +++ b/src/org/rev317/min/accessors/Client.java @@ -48,4 +48,6 @@ public interface Client { public void doAction(int i); public int[] getCurrentStats(); + + public int[] getSettings(); } diff --git a/src/org/rev317/min/api/methods/Game.java b/src/org/rev317/min/api/methods/Game.java index 5761948..ee9c6fc 100644 --- a/src/org/rev317/min/api/methods/Game.java +++ b/src/org/rev317/min/api/methods/Game.java @@ -84,4 +84,24 @@ public class Game { } } + /** + * Returns the settings within the client + * + * @param index The index of the setting you want to gather + * + * @return The specific setting for the given index + */ + public static int getSetting(int index){ + return Loader.getClient().getSettings()[index]; + } + + /** + * Returns all the settings within the client + * + * @return All settings + */ + public static int[] getSettings(){ + return Loader.getClient().getSettings(); + } + }