From e059f98470f7eb26afd51c7c37a284653fbd53d8 Mon Sep 17 00:00:00 2001 From: Eduardo Alonso Date: Wed, 2 Jan 2019 17:51:26 +0100 Subject: [PATCH 01/44] Added extension development instructions --- Extensions.md | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 Extensions.md diff --git a/Extensions.md b/Extensions.md new file mode 100644 index 0000000..5fdc18f --- /dev/null +++ b/Extensions.md @@ -0,0 +1,199 @@ +G-Earth supports console & GUI extensions, this page is focused on extension structure and development. + +## Features +* Packet hash/name support +* Interception of incoming/outgoing packets +* Full chat console support for I/O + +## Console extensions + +Console extensions are the most basic kind of extensions, a few lines of code can get us started. +A console extension is made of a Java class that extends _Extension_. + +Let's start a sample extension creating a maven project: + +Since G-Earth is built using maven, once we've compiled G-Earth, it's possible to add it as a project dependency: +```xml + + + 4.0.0 + + G-EarthGang + SampleExtension + 1.0-SNAPSHOT + + + + org.apache.maven.plugins + maven-jar-plugin + 2.5 + + ${project.build.directory}/bin + + + true + true + lib/ + SampleExtension + false + + + + + + maven-assembly-plugin + 2.5 + + + package + + single + + + + + ${project.build.directory}/bin + + + SampleExtension + + + + jar-with-dependencies + + SampleExtension + false + + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + + + + G-Earth + G-Earth + 0.2 + + + +``` + +That should be enough to configure maven. Now let's move on to the code. + +Every extension needs to include an _ExtensionInfo_ annotation in order to identify the extension, our ExtensionInfo would look like this: +```java +@ExtensionInfo( + Title = "Sample Extension", + Description = "Used for the wiki", + Version = "1.0", + Author = "G-Earth" +) +``` + +The extension constitutes a standalone jar, so we'll need to include a main method to start it up like this: +```java +public class SampleExtension extends Extension { + private SampleExtension(String[] args) { + super(args); + } + + public static void main(String[] args) { + new SampleExtension(args).run(); + } +} +``` + +That would be a bare minimum to get it loaded into G-Earth, now let's have a look at the API to improve our little extension + +## A quick look to the extensions API + +In this section we'll build upon the previous example with the functionality provided by G-Earth's API + +### Intercepting packets +The _intercept_ method lets us intercept a packet from its id and modify it if we want to. +```java +intercept(HMessage.Side.TOCLIENT, 4000, hMessage -> { + // oops we got disconnected +}); +``` + +### Sending packets +G-Earth includes the sendTo[Client/Server] method in order to send packets. + +```java +sendToClient(new HPacket("{l}{u:1234}")); +// or +sendToClient(new HPacket(1234)); +``` +### Initializing our extension + +_initExtension_ is called whenever G-Earth loads the extension, it's specially useful to init the _HashSupport_ and other features, we'll use it in the following examples + +### Doing stuff upon client connection + +```java +@Override +protected void onStartConnection() { + // we're connected to habbo +} +``` + +### HashSupport + +_HashSupport_ allows us to use hashes/names in order to intercept and send packets, using the aforementioned methods. + +```java +private HashSupport mHashSupport; +@Override +protected void initExtension() { + // This is called when G-Earth loads the extension + mHashSupport = new HashSupport(this); + + mHashSupport.intercept(HMessage.Side.TOCLIENT, "RoomUserStartTyping", hMessage -> { + mHashSupport.sendToServer("RoomUserStopTyping"); + }); +} +``` + +### ChatConsole +_ChatConsole_ is a new G-Earth feature that allows us to use the in-game chat in order to communicate with the extension, it can read your input and write messages, you can also set a welcome message, we'll add it to our example. + +```java +private HashSupport mHashSupport; +private ChatConsole mChatConsole; +@Override +protected void initExtension() { + // This is called when G-Earth loads the extension + mHashSupport = new HashSupport(this); + mChatConsole = new ChatConsole(mHashSupport, this, "I'm a welcome message!"); + + mChatConsole.onInput(input -> { + if (input.equals("ping")) + mChatConsole.writeOutput("pong", false); + }); +} +``` + +Once loaded it will appear to your friend's list
+![](https://i.imgur.com/XqYFZmT.png) + +It will show the welcome message after typing _:info_
+![](https://i.imgur.com/1mfBxYm.png)
+![](https://i.imgur.com/294PNUE.png) + +If used correctly it can be pretty powerful. + + + + + From 367bce3bf9c47f7c2ea78fb6c6987b310c44556e Mon Sep 17 00:00:00 2001 From: Eduardo Alonso Date: Wed, 2 Jan 2019 17:51:27 +0100 Subject: [PATCH 02/44] Initial Home page --- Home.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Home.md diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..93f771e --- /dev/null +++ b/Home.md @@ -0,0 +1 @@ +Welcome to the G-Earth wiki! From be180333b7fc9417293f286aac4ed0e6da9f39f7 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 2 Jan 2019 18:41:05 +0100 Subject: [PATCH 03/44] Updated Extensions (markdown) --- Extensions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Extensions.md b/Extensions.md index 5fdc18f..a53ba77 100644 --- a/Extensions.md +++ b/Extensions.md @@ -166,7 +166,8 @@ protected void initExtension() { ``` ### ChatConsole -_ChatConsole_ is a new G-Earth feature that allows us to use the in-game chat in order to communicate with the extension, it can read your input and write messages, you can also set a welcome message, we'll add it to our example. +_ChatConsole_ is a new G-Earth feature that allows us to use the in-game chat in order to easily communicate with the extension, it can read your input and write messages, you can also set a welcome message, we'll add it to our example. +(side note: the implementation of ChatConsole hides the whole thing from the Habbo servers, so all interaction stays local) ```java private HashSupport mHashSupport; From f240a8c22e8fdb3bb991e0d5caba66ed2865fb94 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 2 Jan 2019 18:49:20 +0100 Subject: [PATCH 04/44] Updated Extensions (markdown) --- Extensions.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Extensions.md b/Extensions.md index a53ba77..190c0bb 100644 --- a/Extensions.md +++ b/Extensions.md @@ -148,6 +148,10 @@ protected void onStartConnection() { } ``` +### Minimalistic interaction; onClick + +If the _onClick_ method is overridden by your extension, G-Earth will display a green "Start" button next to your extension and the function will get called on-click. For form extensions, this option is automatically used to open the GUI. For non-gui extensions, this is an additional feature you could use. + ### HashSupport _HashSupport_ allows us to use hashes/names in order to intercept and send packets, using the aforementioned methods. From f8406849bdfc83bc593431da78fe06ddd1a2c8d0 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 2 Jan 2019 18:50:46 +0100 Subject: [PATCH 05/44] Updated Extensions (markdown) --- Extensions.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Extensions.md b/Extensions.md index 190c0bb..eb814cd 100644 --- a/Extensions.md +++ b/Extensions.md @@ -152,6 +152,14 @@ protected void onStartConnection() { If the _onClick_ method is overridden by your extension, G-Earth will display a green "Start" button next to your extension and the function will get called on-click. For form extensions, this option is automatically used to open the GUI. For non-gui extensions, this is an additional feature you could use. +```java +@Override +protected void onClick() { + // the user clicked this extension! I must do something relevant here +} +``` + + ### HashSupport _HashSupport_ allows us to use hashes/names in order to intercept and send packets, using the aforementioned methods. From d2c92cb0c5f69f68846e6e6e98d9284fe756eb4b Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 2 Jan 2019 18:51:11 +0100 Subject: [PATCH 06/44] Updated Extensions (markdown) --- Extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions.md b/Extensions.md index eb814cd..a3cb8fd 100644 --- a/Extensions.md +++ b/Extensions.md @@ -150,7 +150,7 @@ protected void onStartConnection() { ### Minimalistic interaction; onClick -If the _onClick_ method is overridden by your extension, G-Earth will display a green "Start" button next to your extension and the function will get called on-click. For form extensions, this option is automatically used to open the GUI. For non-gui extensions, this is an additional feature you could use. +If (and only if) the _onClick_ method is overridden by your extension, G-Earth will display a green "Start" button next to your extension and the function will get called on-click. For form extensions, this option is automatically used to open the GUI. For non-gui extensions, this is an additional feature you could use. ```java @Override From 3049d996340a4e0785938a5fa75450a7376431d3 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 2 Jan 2019 18:54:06 +0100 Subject: [PATCH 07/44] Updated Extensions (markdown) --- Extensions.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Extensions.md b/Extensions.md index a3cb8fd..d8222a5 100644 --- a/Extensions.md +++ b/Extensions.md @@ -119,8 +119,13 @@ That would be a bare minimum to get it loaded into G-Earth, now let's have a loo In this section we'll build upon the previous example with the functionality provided by G-Earth's API +### Initializing our extension + +_initExtension_ is called whenever G-Earth loads the extension, it's specially useful to init the _HashSupport_ and other features, we'll use it in the following examples + + ### Intercepting packets -The _intercept_ method lets us intercept a packet from its id and modify it if we want to. +The _intercept_ method lets us intercept a packet from its id and modify it if we want to. Typically, we use this function call inside _initExtension_. ```java intercept(HMessage.Side.TOCLIENT, 4000, hMessage -> { // oops we got disconnected @@ -135,9 +140,6 @@ sendToClient(new HPacket("{l}{u:1234}")); // or sendToClient(new HPacket(1234)); ``` -### Initializing our extension - -_initExtension_ is called whenever G-Earth loads the extension, it's specially useful to init the _HashSupport_ and other features, we'll use it in the following examples ### Doing stuff upon client connection From 0044e08c53664a6f1be39c271c02a41e2bfaa313 Mon Sep 17 00:00:00 2001 From: Eduardo Alonso Date: Wed, 2 Jan 2019 22:54:18 +0100 Subject: [PATCH 08/44] Add ExtensionForm example --- Extensions.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Extensions.md b/Extensions.md index d8222a5..180d11c 100644 --- a/Extensions.md +++ b/Extensions.md @@ -208,7 +208,35 @@ It will show the welcome message after typing _:info_
If used correctly it can be pretty powerful. +## GUI extensions + +We'll build a simple GUI based extension using the concepts we learnt on the console extension part. + +The main difference is that instead of extending from _Extension_ we'll extend from _ExtensionForm_. This introduces some changes, for example, in order to call to our extension in _main_, we'll call _runExtensionForm_ instead of the constructor. + +```java +public class SampleExtension extends ExtensionForm { + public static void main(String[] args) { + runExtensionForm(args, SampleExtension.class); + } +} +``` + +Since _ExtensionForm_ is an abstract class, we'll have to implement _launchForm_ in order to setup the javafx components +```java +public ExtensionForm launchForm(Stage primaryStage) throws Exception { + FXMLLoader loader = new FXMLLoader(getClass().getResource("sampleextension.fxml")); + Parent root = loader.load(); + + primaryStage.setTitle("Sample extension"); + primaryStage.setScene(new Scene(root)); + primaryStage.setResizable(false); + + return loader.getController(); +} +``` + +Assuming you've created the .fxml file, this code would be enough for G-Earth to load your extension. - - +From there, you can design your own UI and use the API to create a fully functional extension. \ No newline at end of file From ff782aead646300cb030d0a1fd6ef361aa637307 Mon Sep 17 00:00:00 2001 From: Eduardo Alonso Date: Wed, 16 Jan 2019 21:34:52 +0100 Subject: [PATCH 09/44] Created macOs Installation guide (markdown) --- macOs-Installation-guide.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 macOs-Installation-guide.md diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md new file mode 100644 index 0000000..ac0e26e --- /dev/null +++ b/macOs-Installation-guide.md @@ -0,0 +1,20 @@ +In order to run G-Earth on macOs, you'll need to sign G-Mem (our memory searcher). This wiki page will cover that process. + +First we'll create a certificate in order to sign it: +1. Open the Keychain Access application (You may find it inside Utilities).£ +2. Select Certificate Assistant -> Create a Certificate.
+![](https://i.imgur.com/G6SS6ac.png) +3. Choose a name for the certificate (I'll use "gmem-cert") and set "Certificate Type" to "Code Signing". Also select "Let me override defaults" option.
+![](https://i.imgur.com/CAUI5Xi.png) +4. Click on "Continue" until "Specify a Location For The Certificate" appears, then set "Keychain" to "System".
+![](https://i.imgur.com/HwLDtmE.png) +5. Continue, the certificate will be created then.
+![](https://i.imgur.com/gYiKmZA.png) + +Once created, we are able to codesign gmem from Terminal
+`codesign -fs "gmem-cert" /G-Mem` + +![](https://i.imgur.com/xkryoJz.png) + +Now you're ready to open G-Earth from Terminal
+`sudo java -jar G-Earth.jar` From ec148cc553e6a89caa65ccbd805d8d11584e2b69 Mon Sep 17 00:00:00 2001 From: Eduardo Alonso Date: Wed, 16 Jan 2019 21:41:49 +0100 Subject: [PATCH 10/44] Updated macOs Installation guide (markdown) --- macOs-Installation-guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md index ac0e26e..220d10c 100644 --- a/macOs-Installation-guide.md +++ b/macOs-Installation-guide.md @@ -1,3 +1,5 @@ +**NOTE: Currently supported browsers: ONLY Firefox and Chromium** + In order to run G-Earth on macOs, you'll need to sign G-Mem (our memory searcher). This wiki page will cover that process. First we'll create a certificate in order to sign it: From e103aa2902e1d1cd545dfa42ee8c73a767c63973 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 15:10:44 +0100 Subject: [PATCH 11/44] Created Troubleshooting (markdown) --- Troubleshooting.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Troubleshooting.md diff --git a/Troubleshooting.md b/Troubleshooting.md new file mode 100644 index 0000000..d42bc1a --- /dev/null +++ b/Troubleshooting.md @@ -0,0 +1,26 @@ +There are some known issues while using G-Earth, please read this through carefully. + +First of all, make sure you have extracted the .rar file to its own folder. +If you're using a mac; make sure you have completed the mac-installation wiki page. + + +If the following solutions do NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. +Include the following things in your issue: +* Java version +* Your operating system +* For windows: open CMD as administrator and navigate to the G-Earth folder, execute "java -jar G-Earth.jar" and wait for your specific problem to occur. Afterwards, take a screenshot and include it in the issue. +* For mac&linux: the same thing, but open a terminal instead and use the command "sudo java -jar G-Earth.jar" + + +## Problem 1: G-Earth doesn't open +* It's recommended to use Java 8, some problems have occurred with people using Java 11 or other versions. It shouldn't be hard to fix this with a simple google search. +* On Linux, if you get a "Invalid MIT-MAGIC-COOKIE-1" exception, execute "xhost +local:" in a terminal +* It will almost always be an issue with Java, so try reinstalling + +## Problem 2: Stuck at 76% +* On windows; navigate to https://visualstudio.microsoft.com/downloads/ and download the c++ redistributable 2017 ( https://imgur.com/a/bgvL8fN ), make sure to select the right version. +* Try another browser. (on Mac, use Firefox. On Windows, use Chrome, Firefox or Opera, others might work as well, but IE and Edge do not) +* Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/16 +* MAKE SURE your downloaded the right .rar file, for Windows, check if you're running on a 32bit or 64bit device first. + +If you had an issue and solved with a different solution and feel like it belongs on this page, feel free to create an issue. \ No newline at end of file From e409768653a2b5f461abc225f60b99731ec52ed7 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 15:16:45 +0100 Subject: [PATCH 12/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index d42bc1a..dce6d2b 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -23,4 +23,4 @@ Include the following things in your issue: * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/16 * MAKE SURE your downloaded the right .rar file, for Windows, check if you're running on a 32bit or 64bit device first. -If you had an issue and solved with a different solution and feel like it belongs on this page, feel free to create an issue. \ No newline at end of file +If you had an issue and you solved it with a different solution and feel like it belongs on this page, feel free to create an issue. \ No newline at end of file From 843768bbec3821d1aa7fb27b63beeb1fd57294ff Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 15:17:50 +0100 Subject: [PATCH 13/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index dce6d2b..128ecb6 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -3,15 +3,6 @@ There are some known issues while using G-Earth, please read this through carefu First of all, make sure you have extracted the .rar file to its own folder. If you're using a mac; make sure you have completed the mac-installation wiki page. - -If the following solutions do NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. -Include the following things in your issue: -* Java version -* Your operating system -* For windows: open CMD as administrator and navigate to the G-Earth folder, execute "java -jar G-Earth.jar" and wait for your specific problem to occur. Afterwards, take a screenshot and include it in the issue. -* For mac&linux: the same thing, but open a terminal instead and use the command "sudo java -jar G-Earth.jar" - - ## Problem 1: G-Earth doesn't open * It's recommended to use Java 8, some problems have occurred with people using Java 11 or other versions. It shouldn't be hard to fix this with a simple google search. * On Linux, if you get a "Invalid MIT-MAGIC-COOKIE-1" exception, execute "xhost +local:" in a terminal @@ -23,4 +14,13 @@ Include the following things in your issue: * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/16 * MAKE SURE your downloaded the right .rar file, for Windows, check if you're running on a 32bit or 64bit device first. -If you had an issue and you solved it with a different solution and feel like it belongs on this page, feel free to create an issue. \ No newline at end of file +## Creating an Issue +If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. +Include the following things in your issue: +* Java version +* Your operating system +* For windows: open CMD as administrator and navigate to the G-Earth folder, execute "java -jar G-Earth.jar" and wait for your specific problem to occur. Afterwards, take a screenshot and include it in the issue. +* For mac&linux: the same thing, but open a terminal instead and use the command "sudo java -jar G-Earth.jar" + + +If you had an issue and solved it with a different solution and feel like it belongs on this page, feel free to create an issue. \ No newline at end of file From b162d2f463ed3a55bdb693a156496c431767d121 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 15:19:10 +0100 Subject: [PATCH 14/44] Updated Home (markdown) --- Home.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Home.md b/Home.md index 93f771e..fd5ff09 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,5 @@ Welcome to the G-Earth wiki! + +For extension development, go to https://github.com/sirjonasxx/G-Earth/wiki/Extensions +For troubleshooting, go to https://github.com/sirjonasxx/G-Earth/wiki/Troubleshooting +For Mac installation, go to https://github.com/sirjonasxx/G-Earth/wiki/macOs-Installation-guide \ No newline at end of file From c9c5e4effcec0e305a19760a28fd4b76631d4db1 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 15:19:18 +0100 Subject: [PATCH 15/44] Updated Home (markdown) --- Home.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Home.md b/Home.md index fd5ff09..32d7ef6 100644 --- a/Home.md +++ b/Home.md @@ -1,5 +1,7 @@ Welcome to the G-Earth wiki! For extension development, go to https://github.com/sirjonasxx/G-Earth/wiki/Extensions + For troubleshooting, go to https://github.com/sirjonasxx/G-Earth/wiki/Troubleshooting + For Mac installation, go to https://github.com/sirjonasxx/G-Earth/wiki/macOs-Installation-guide \ No newline at end of file From 1c17d3b8847720cffcc309bdf77d9d8e059d6015 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 17:22:07 +0100 Subject: [PATCH 16/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 128ecb6..9cef404 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -11,9 +11,11 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa ## Problem 2: Stuck at 76% * On windows; navigate to https://visualstudio.microsoft.com/downloads/ and download the c++ redistributable 2017 ( https://imgur.com/a/bgvL8fN ), make sure to select the right version. * Try another browser. (on Mac, use Firefox. On Windows, use Chrome, Firefox or Opera, others might work as well, but IE and Edge do not) -* Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/16 * MAKE SURE your downloaded the right .rar file, for Windows, check if you're running on a 32bit or 64bit device first. +## Problem 3: Habbo loads, but G-Earth isn't connected +* Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/16 + ## Creating an Issue If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. Include the following things in your issue: From 38a12dc448d9460f431bd679e214ad1f3e771ecf Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sat, 26 Jan 2019 17:29:57 +0100 Subject: [PATCH 17/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 9cef404..18f07b6 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -14,7 +14,7 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa * MAKE SURE your downloaded the right .rar file, for Windows, check if you're running on a 32bit or 64bit device first. ## Problem 3: Habbo loads, but G-Earth isn't connected -* Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/16 +* Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/17 ## Creating an Issue If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. From b0d5f65d2883b80273f234ec5a1ce9f03c02972e Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 3 Feb 2019 03:07:54 +0100 Subject: [PATCH 18/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Troubleshooting.md b/Troubleshooting.md index 18f07b6..e161919 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -6,6 +6,7 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa ## Problem 1: G-Earth doesn't open * It's recommended to use Java 8, some problems have occurred with people using Java 11 or other versions. It shouldn't be hard to fix this with a simple google search. * On Linux, if you get a "Invalid MIT-MAGIC-COOKIE-1" exception, execute "xhost +local:" in a terminal +* On Linux, if you get a "could not find or load main class gearth.Main", javafx might not be installed. Execute "apt install openjfx" to install javafx * It will almost always be an issue with Java, so try reinstalling ## Problem 2: Stuck at 76% From 75851b7a5548ce9e6e73b01a0d9080b9cbb7f9ca Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 3 Feb 2019 03:10:28 +0100 Subject: [PATCH 19/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index e161919..464ddd6 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -1,6 +1,6 @@ -There are some known issues while using G-Earth, please read this through carefully. +There are some known issues with the execution G-Earth, please read this through carefully. -First of all, make sure you have extracted the .rar file to its own folder. +First of all, make sure you have extracted the .rar file into its own folder. If you're using a mac; make sure you have completed the mac-installation wiki page. ## Problem 1: G-Earth doesn't open From a67c9fc7387af0dd062998635bc96785f5b9b314 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 3 Feb 2019 03:13:25 +0100 Subject: [PATCH 20/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Troubleshooting.md b/Troubleshooting.md index 464ddd6..14366ec 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -16,6 +16,7 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa ## Problem 3: Habbo loads, but G-Earth isn't connected * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/17 +* The port of the hotel you're trying to connect with (30000 or 38101 on most hotels) must not be in use by any other process than G-Earth. There are platform-specific ways to find out what ports are in-use by googling. ## Creating an Issue If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. From 7d17391b34f43885aba2c70442b9dc10d7286584 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 3 Feb 2019 03:14:35 +0100 Subject: [PATCH 21/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Troubleshooting.md b/Troubleshooting.md index 14366ec..f84a71f 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -17,6 +17,7 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa ## Problem 3: Habbo loads, but G-Earth isn't connected * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/17 * The port of the hotel you're trying to connect with (30000 or 38101 on most hotels) must not be in use by any other process than G-Earth. There are platform-specific ways to find out what ports are in-use by googling. +* Make sure you don't have a VPN(/browser extension) enabled ## Creating an Issue If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. From f37522f5e1750eb4fddda6518d45e55d25b6458e Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 3 Feb 2019 12:43:22 +0100 Subject: [PATCH 22/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Troubleshooting.md b/Troubleshooting.md index f84a71f..4bb88a2 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -18,6 +18,7 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/17 * The port of the hotel you're trying to connect with (30000 or 38101 on most hotels) must not be in use by any other process than G-Earth. There are platform-specific ways to find out what ports are in-use by googling. * Make sure you don't have a VPN(/browser extension) enabled +* Your antivirus might be the problem ## Creating an Issue If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. From 283630f5f2b457d8991ad892f2db4c8fd5a3e289 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Mon, 4 Feb 2019 22:54:15 +0100 Subject: [PATCH 23/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 4bb88a2..6da09f5 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -18,7 +18,8 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/17 * The port of the hotel you're trying to connect with (30000 or 38101 on most hotels) must not be in use by any other process than G-Earth. There are platform-specific ways to find out what ports are in-use by googling. * Make sure you don't have a VPN(/browser extension) enabled -* Your antivirus might be the problem +* Your antivirus might be the problem, try to disable it +* Your firewall might be the problem, try to disable it ## Creating an Issue If the solutions did NOT help you, navigate to https://github.com/sirjonasxx/G-Earth/issues and, if it hasn't been solved before, create a new issue. From ccb1c143c044868bf51d82092d622b68133c4ffa Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 3 Jun 2020 18:31:33 +0200 Subject: [PATCH 24/44] Updated Extensions (markdown) --- Extensions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Extensions.md b/Extensions.md index 180d11c..75deebd 100644 --- a/Extensions.md +++ b/Extensions.md @@ -1,4 +1,5 @@ G-Earth supports console & GUI extensions, this page is focused on extension structure and development. +Visit https://github.com/sirjonasxx/G-Earth-template-extensions to start from a minimalistic template extension ## Features * Packet hash/name support From 9bd169ebf0c8bbfafd066e048a87f9643431f029 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 3 Jun 2020 18:31:45 +0200 Subject: [PATCH 25/44] Updated Extensions (markdown) --- Extensions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Extensions.md b/Extensions.md index 75deebd..0ffce43 100644 --- a/Extensions.md +++ b/Extensions.md @@ -1,4 +1,5 @@ G-Earth supports console & GUI extensions, this page is focused on extension structure and development. + Visit https://github.com/sirjonasxx/G-Earth-template-extensions to start from a minimalistic template extension ## Features From f22504d9dde2474f6930c8d868f2af885c1a1ef5 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 4 Aug 2020 19:10:45 +0200 Subject: [PATCH 26/44] Updated macOs Installation guide (markdown) --- macOs-Installation-guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md index 220d10c..8470f01 100644 --- a/macOs-Installation-guide.md +++ b/macOs-Installation-guide.md @@ -20,3 +20,5 @@ Once created, we are able to codesign gmem from Terminal
Now you're ready to open G-Earth from Terminal
`sudo java -jar G-Earth.jar` + +If you experience any other issues and the troubleshooting page doesn't help, it might be useful to have a look at the following issues: [#67](../../issues/67) [#10](../../issues/10) \ No newline at end of file From dd69442751d2b0ffedb437cb5726c0dc009da8b0 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Fri, 28 Aug 2020 00:35:44 +0200 Subject: [PATCH 27/44] Updated macOs Installation guide (markdown) --- macOs-Installation-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md index 8470f01..cf90fbd 100644 --- a/macOs-Installation-guide.md +++ b/macOs-Installation-guide.md @@ -21,4 +21,4 @@ Once created, we are able to codesign gmem from Terminal
Now you're ready to open G-Earth from Terminal
`sudo java -jar G-Earth.jar` -If you experience any other issues and the troubleshooting page doesn't help, it might be useful to have a look at the following issues: [#67](../../issues/67) [#10](../../issues/10) \ No newline at end of file +If you experience any other issues and the troubleshooting page doesn't help, it might be useful to have a look at the following issues: [#67](../issues/67) [#10](../issues/10) \ No newline at end of file From b6c52810c14048fe55f38032e7440a7b8c44dbce Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 20 Oct 2020 12:45:41 +0200 Subject: [PATCH 28/44] Created G-Python qtConsole (markdown) --- G-Python-qtConsole.md | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 G-Python-qtConsole.md diff --git a/G-Python-qtConsole.md b/G-Python-qtConsole.md new file mode 100644 index 0000000..a8bca6e --- /dev/null +++ b/G-Python-qtConsole.md @@ -0,0 +1,56 @@ +## Requirements +* Understand the G-Python extension interface (https://github.com/sirjonasxx/G-Python) +* Make sure your python version (`python --version` on commandline) is >= 3.2 +* Execute the following line on commandline: `python -m pip install qtconsole pyqt5 jupyter-console g-python` to install the required packages + +## Usage +1. Go to the "Extra" tab on G-Earth and check the "Enable G-Python Scripting" checkbox +2. Go to the "Extensions" tab and open a G-Python shell + +The shell will automatically do the following things for you: +* Import all G-Python classes & modules (`Extension`, `Direction`, `HMessage`, `HPacket`, `hparsers`, `htools`) +* Import the `sleep()` function from the `time` module +* Initialize a G-Python extension (named `ext`) and connect it to G-Earth +* Create an interface for all methods of the Extension object (for example: `ext.send_to_server(packet)` can also be executed with just `send_to_server(packet)`) + +![G-Python shell extension](https://i.imgur.com/ekOPLYu.png) + +### QtConsole shortcuts + +Shortcuts: +* TAB -> Autocomplete +* SHIFT+TAB -> Show function arguments + docs +* ENTER -> Execute the entered python script or continue it on the next line, depending on context +* CTRL+ENTER -> Same as "ENTER", but always continue the current script +* SHIFT+ENTER -> Same as "ENTER", but always execute + +Commands: +* %quickref -> list of all qtConsole commands +* %clear -> clears the window +* %save -> saves specific lines to a file (example: `%save test 4-7`, saves lines 4 to 7 to `test.py`) +* %load -> loads script from a file (example: `load test`, loads `test.py`) + +## Example +#### Example 1: send all user signs + +![example 1](https://i.imgur.com/4kjnPlo.png) + +_(hint: to save this script: `%save all_signs 23-24`)_ + +#### Example 2: wave when typing "wave" + +![example 2](https://i.imgur.com/xo6GhOi.png) + +_(hint: if you're going to `sleep()` during an `intercept()` callback, create a new thread first, or all incoming/outgoing packet flow will be paused)_ + +_(hint: in the method signature `def on_speech(message: HMessage)`, `: HMessage` isn't required but makes auto-completion easier)_ + +#### Example 3: get all room furniture + +![example 3](https://i.imgur.com/CJCErDh.png) + +#### Example 4: get all room users + +![example 4](https://i.imgur.com/b2czJUw.png) + +_(prints the list of all HEntities in the room, in which all of them are mapped to their corresponding string representation)_ \ No newline at end of file From f8772f2a242fc06e7808cb582ddc878c12efa964 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 20 Oct 2020 13:06:21 +0200 Subject: [PATCH 29/44] Updated Home (markdown) --- Home.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 32d7ef6..708dba2 100644 --- a/Home.md +++ b/Home.md @@ -4,4 +4,6 @@ For extension development, go to https://github.com/sirjonasxx/G-Earth/wiki/Exte For troubleshooting, go to https://github.com/sirjonasxx/G-Earth/wiki/Troubleshooting -For Mac installation, go to https://github.com/sirjonasxx/G-Earth/wiki/macOs-Installation-guide \ No newline at end of file +For Mac installation, go to https://github.com/sirjonasxx/G-Earth/wiki/macOs-Installation-guide + +For the G-Python console, go to https://github.com/sirjonasxx/G-Earth/wiki/G-Python-qtConsole \ No newline at end of file From a91ed133e13d44863f6271d39c9227ab51836c32 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 17 Nov 2020 02:06:43 +0100 Subject: [PATCH 30/44] Updated G Python qtConsole (markdown) --- G-Python-qtConsole.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/G-Python-qtConsole.md b/G-Python-qtConsole.md index a8bca6e..eafe7d4 100644 --- a/G-Python-qtConsole.md +++ b/G-Python-qtConsole.md @@ -3,6 +3,8 @@ * Make sure your python version (`python --version` on commandline) is >= 3.2 * Execute the following line on commandline: `python -m pip install qtconsole pyqt5 jupyter-console g-python` to install the required packages +(IMPORTANT: On Linux devices, the installation command might require a `sudo`, since G-Earth runs in `sudo` as well.) + ## Usage 1. Go to the "Extra" tab on G-Earth and check the "Enable G-Python Scripting" checkbox 2. Go to the "Extensions" tab and open a G-Python shell From 5be0b13faa456183c5289937b655a95b11099e01 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Fri, 22 Jan 2021 19:51:28 +0100 Subject: [PATCH 31/44] Created Unity versions (markdown) --- Unity-versions.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Unity-versions.md diff --git a/Unity-versions.md b/Unity-versions.md new file mode 100644 index 0000000..ee4243c --- /dev/null +++ b/Unity-versions.md @@ -0,0 +1,3 @@ +* "0.12.2 (84) (beta)" - 84_ce2766f45c2772a59229f830f2fe2fd5 +* "0.13.0 (173) (beta)" - 173_87a892a61a7069109645d4f4dde117e5 +* "0.13.1 (181) (beta)" - 181_5fbcf527e26f96ac0c4daba1af58b816 \ No newline at end of file From 6aef40f004e1617bcd26601fe099afb8050bbc91 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 13 Apr 2021 02:37:42 +0200 Subject: [PATCH 32/44] Updated G Python qtConsole (markdown) --- G-Python-qtConsole.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/G-Python-qtConsole.md b/G-Python-qtConsole.md index eafe7d4..5b45154 100644 --- a/G-Python-qtConsole.md +++ b/G-Python-qtConsole.md @@ -43,7 +43,7 @@ _(hint: to save this script: `%save all_signs 23-24`)_ ![example 2](https://i.imgur.com/xo6GhOi.png) -_(hint: if you're going to `sleep()` during an `intercept()` callback, create a new thread first, or all incoming/outgoing packet flow will be paused)_ +_(hint: if you're going to `sleep()` during an `intercept()` callback, do an asynchronous intercept (check g-python repo), or all incoming/outgoing packet flow will be paused)_ _(hint: in the method signature `def on_speech(message: HMessage)`, `: HMessage` isn't required but makes auto-completion easier)_ From 8a1ce6975f073fc2ad55895ede975e758c3f0b08 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 13 Apr 2021 02:38:34 +0200 Subject: [PATCH 33/44] Destroyed Unity versions (markdown) --- Unity-versions.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Unity-versions.md diff --git a/Unity-versions.md b/Unity-versions.md deleted file mode 100644 index ee4243c..0000000 --- a/Unity-versions.md +++ /dev/null @@ -1,3 +0,0 @@ -* "0.12.2 (84) (beta)" - 84_ce2766f45c2772a59229f830f2fe2fd5 -* "0.13.0 (173) (beta)" - 173_87a892a61a7069109645d4f4dde117e5 -* "0.13.1 (181) (beta)" - 181_5fbcf527e26f96ac0c4daba1af58b816 \ No newline at end of file From 3c983ada59a09875b09c885831ac63a9f0925d98 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Thu, 29 Apr 2021 03:45:14 +0200 Subject: [PATCH 34/44] Updated Troubleshooting (markdown) --- Troubleshooting.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 6da09f5..524c5b5 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -1,3 +1,5 @@ +**HABBO AIR CURRENTLY DOESN'T WORK FOR MAC** + There are some known issues with the execution G-Earth, please read this through carefully. First of all, make sure you have extracted the .rar file into its own folder. @@ -9,10 +11,13 @@ If you're using a mac; make sure you have completed the mac-installation wiki pa * On Linux, if you get a "could not find or load main class gearth.Main", javafx might not be installed. Execute "apt install openjfx" to install javafx * It will almost always be an issue with Java, so try reinstalling -## Problem 2: Stuck at 76% +## Problem 2: Stuck at 76% or 57% * On windows; navigate to https://visualstudio.microsoft.com/downloads/ and download the c++ redistributable 2017 ( https://imgur.com/a/bgvL8fN ), make sure to select the right version. * Try another browser. (on Mac, use Firefox. On Windows, use Chrome, Firefox or Opera, others might work as well, but IE and Edge do not) * MAKE SURE your downloaded the right .rar file, for Windows, check if you're running on a 32bit or 64bit device first. +* If you got a message redirecting you to the troubleshooting page, the issue likely has to do with something G-Mem related. + - Try double clicking G-Mem.exe and see if any errors appear, this may help you in troubleshooting + - In rare cases, I found people that couldn't use G-Mem.exe if it was executed with admin permissions. If you can verify you have the same issue, you could make your hosts file editable by non-admin users and run G-Earth in a non-admin fashion. Beware: this is a security risk but I found no other solution ## Problem 3: Habbo loads, but G-Earth isn't connected * Your hosts file might have some permissions issues. Delete it and place a new one: https://github.com/sirjonasxx/G-Earth/issues/17 From f88f10c3a85c0a35c48c2605aa51a9ca5457310f Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Thu, 20 May 2021 01:18:35 +0200 Subject: [PATCH 35/44] Updated Extensions (markdown) --- Extensions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Extensions.md b/Extensions.md index 0ffce43..53f0049 100644 --- a/Extensions.md +++ b/Extensions.md @@ -1,3 +1,5 @@ +# Warning - this wiki page is outdated + G-Earth supports console & GUI extensions, this page is focused on extension structure and development. Visit https://github.com/sirjonasxx/G-Earth-template-extensions to start from a minimalistic template extension From b1f52c7ff93300f900a7206909f5987019d9fcd2 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Thu, 20 May 2021 01:20:46 +0200 Subject: [PATCH 36/44] Updated macOs Installation guide (markdown) --- macOs-Installation-guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md index cf90fbd..42549c9 100644 --- a/macOs-Installation-guide.md +++ b/macOs-Installation-guide.md @@ -1,5 +1,7 @@ **NOTE: Currently supported browsers: ONLY Firefox and Chromium** +**NOTE 2: AIR is currently not supported for Mac. The unity version works, and doesn't require the steps below to get it to work** + In order to run G-Earth on macOs, you'll need to sign G-Mem (our memory searcher). This wiki page will cover that process. First we'll create a certificate in order to sign it: From 4cbb73473dce516d5401c20f276a34501ee80cdd Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 18 Jul 2021 02:13:44 +0200 Subject: [PATCH 37/44] Updated Extensions (markdown) --- Extensions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Extensions.md b/Extensions.md index 53f0049..3534547 100644 --- a/Extensions.md +++ b/Extensions.md @@ -121,6 +121,8 @@ That would be a bare minimum to get it loaded into G-Earth, now let's have a loo ## A quick look to the extensions API +**!!!Warning: since G-Earth 1.4, HashSupport has been renamed to PacketInfoSupport!!!** + In this section we'll build upon the previous example with the functionality provided by G-Earth's API ### Initializing our extension From 55aeacc70e5e3bce8649f2a002025eec3ca10f49 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Thu, 19 Aug 2021 04:39:09 +0200 Subject: [PATCH 38/44] Updated Extensions (markdown) --- Extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions.md b/Extensions.md index 3534547..d1346a5 100644 --- a/Extensions.md +++ b/Extensions.md @@ -1,4 +1,4 @@ -# Warning - this wiki page is outdated +# Warning - this wiki page is outdated - will be updated soon. In the meanwhile, ask any questions in the Discord server. G-Earth supports console & GUI extensions, this page is focused on extension structure and development. From 9ca54387e9356a6b10204de35fe6ee3ed9ae8f70 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 24 Aug 2021 05:14:02 +0200 Subject: [PATCH 39/44] Updated macOs Installation guide (markdown) --- macOs-Installation-guide.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md index 42549c9..cf90fbd 100644 --- a/macOs-Installation-guide.md +++ b/macOs-Installation-guide.md @@ -1,7 +1,5 @@ **NOTE: Currently supported browsers: ONLY Firefox and Chromium** -**NOTE 2: AIR is currently not supported for Mac. The unity version works, and doesn't require the steps below to get it to work** - In order to run G-Earth on macOs, you'll need to sign G-Mem (our memory searcher). This wiki page will cover that process. First we'll create a certificate in order to sign it: From d7b12b8f1c0e69cfb6f63266ae8fe0940e2b3b20 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 24 Aug 2021 05:14:30 +0200 Subject: [PATCH 40/44] Updated macOs Installation guide (markdown) --- macOs-Installation-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOs-Installation-guide.md b/macOs-Installation-guide.md index cf90fbd..a098176 100644 --- a/macOs-Installation-guide.md +++ b/macOs-Installation-guide.md @@ -1,4 +1,4 @@ -**NOTE: Currently supported browsers: ONLY Firefox and Chromium** +**NOTE: Currently supported browsers: ONLY Firefox and Chromium, works on Habbo AIR too** In order to run G-Earth on macOs, you'll need to sign G-Mem (our memory searcher). This wiki page will cover that process. From add6a509bbac2ef8684590ff49928478cbde8754 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Tue, 24 Aug 2021 05:15:28 +0200 Subject: [PATCH 41/44] Updated Extensions (markdown) --- Extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions.md b/Extensions.md index d1346a5..5946e88 100644 --- a/Extensions.md +++ b/Extensions.md @@ -1,4 +1,4 @@ -# Warning - this wiki page is outdated - will be updated soon. In the meanwhile, ask any questions in the Discord server. +# Warning - this wiki page is outdated - will be updated soon. In the meanwhile, ask any questions in the Discord server or check the [template extensions](https://github.com/sirjonasxx/G-Earth-template-extensions) G-Earth supports console & GUI extensions, this page is focused on extension structure and development. From 7f0b19403bfa790fa86c3286a481a1461118ab0e Mon Sep 17 00:00:00 2001 From: Alisson Nunes <12958674+Alynva@users.noreply.github.com> Date: Tue, 5 Oct 2021 00:16:45 +0000 Subject: [PATCH 42/44] Move README to docs folder --- README.md => docs/README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => docs/README.md (100%) diff --git a/README.md b/docs/README.md similarity index 100% rename from README.md rename to docs/README.md From f5de367fe6b65d7d16a37a68e9f42debafb6b409 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 9 Feb 2022 20:10:07 +0100 Subject: [PATCH 43/44] sort extensions by recently updated --- .../GExtensionStoreController.java | 9 ++-- .../queriedoverviews/ByUpdateOverview.java | 54 +++++++++++++++++++ .../application/webview/index.html | 2 +- 3 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/entities/queriedoverviews/ByUpdateOverview.java diff --git a/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/GExtensionStoreController.java b/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/GExtensionStoreController.java index d22ae0e..f01de68 100644 --- a/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/GExtensionStoreController.java +++ b/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/GExtensionStoreController.java @@ -7,6 +7,7 @@ import gearth.services.internal_extensions.extensionstore.application.entities.c import gearth.services.internal_extensions.extensionstore.application.entities.installed.InstalledOverview; import gearth.services.internal_extensions.extensionstore.application.entities.queriedoverviews.ByDateOverview; import gearth.services.internal_extensions.extensionstore.application.entities.queriedoverviews.ByRatingOverview; +import gearth.services.internal_extensions.extensionstore.application.entities.queriedoverviews.ByUpdateOverview; import gearth.services.internal_extensions.extensionstore.application.entities.search.SearchOverview; import gearth.services.internal_extensions.extensionstore.repository.StoreRepository; import javafx.application.Platform; @@ -47,20 +48,20 @@ public class GExtensionStoreController implements Initializable { JSObject window = (JSObject) webView.getEngine().executeScript("window"); window.setMember("app", extensionStore); - Element by_date_link = webView.getEngine().getDocument().getElementById("overview_by_date"); + Element by_update_link = webView.getEngine().getDocument().getElementById("overview_by_update"); Element by_rating_link = webView.getEngine().getDocument().getElementById("overview_by_rating"); Element by_category_link = webView.getEngine().getDocument().getElementById("overview_by_category"); Element installed_link = webView.getEngine().getDocument().getElementById("overview_installed"); Element seach_link = webView.getEngine().getDocument().getElementById("search_page"); Map> hOverviewSupplier = new HashMap<>(); - hOverviewSupplier.put(by_date_link, () -> new ByDateOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); + hOverviewSupplier.put(by_update_link, () -> new ByUpdateOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); hOverviewSupplier.put(by_rating_link, () -> new ByRatingOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); hOverviewSupplier.put(by_category_link, () -> new CategoryOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); hOverviewSupplier.put(installed_link, () -> new InstalledOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); hOverviewSupplier.put(seach_link, () -> new SearchOverview(null, getStoreRepository())); - Arrays.asList(by_date_link, by_rating_link, by_category_link, installed_link, seach_link).forEach(l -> + Arrays.asList(by_update_link, by_rating_link, by_category_link, installed_link, seach_link).forEach(l -> ((EventTarget) l).addEventListener("click", event -> { if (initialized) setRootOverview(hOverviewSupplier.get(l).get()); }, true)); @@ -210,7 +211,7 @@ public class GExtensionStoreController implements Initializable { private void onFullInitialize() { initialized = true; - setRootOverview(new ByDateOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); + setRootOverview(new ByUpdateOverview(null, 0, GExtensionStore.PAGESIZE, getStoreRepository())); } public void gExtensionStore(GExtensionStore gExtensionStore) { diff --git a/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/entities/queriedoverviews/ByUpdateOverview.java b/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/entities/queriedoverviews/ByUpdateOverview.java new file mode 100644 index 0000000..36137ba --- /dev/null +++ b/G-Earth/src/main/java/gearth/services/internal_extensions/extensionstore/application/entities/queriedoverviews/ByUpdateOverview.java @@ -0,0 +1,54 @@ +package gearth.services.internal_extensions.extensionstore.application.entities.queriedoverviews; + +import gearth.misc.OSValidator; +import gearth.services.internal_extensions.extensionstore.application.entities.HOverview; +import gearth.services.internal_extensions.extensionstore.repository.StoreRepository; +import gearth.services.internal_extensions.extensionstore.repository.models.StoreExtension; +import gearth.services.internal_extensions.extensionstore.repository.querying.ExtensionOrdering; + +import java.util.Collections; +import java.util.List; + +public class ByUpdateOverview extends QueriedExtensionOverview { + + + public ByUpdateOverview(HOverview parent, int startIndex, int size, StoreRepository storeRepository) { + super(parent, startIndex, size, storeRepository); + } + + protected List query(int startIndex, int size) { + return storeRepository.getExtensions(startIndex, size, "", ExtensionOrdering.LAST_UPDATED, + Collections.singletonList(OSValidator.getOSFull()), null, null, null, false, false); + } + + @Override + public Header header() { + return new Header() { + @Override + public String iconUrl() { + return "images/overviews/clock.png"; + } + + @Override + public String title() { + return "Recently Updated"; + } + + @Override + public String description() { + return "Extensions that were recently updated"; + } + + @Override + public String contentTitle() { + return "Recently Updated"; + } + }; + } + + + @Override + public HOverview getNewPage(int startIndex, int size) { + return new ByUpdateOverview(parent, startIndex, size, storeRepository); + } +} diff --git a/G-Earth/src/main/resources/gearth/services/internal_extensions/extensionstore/application/webview/index.html b/G-Earth/src/main/resources/gearth/services/internal_extensions/extensionstore/application/webview/index.html index 71a837a..e24148e 100644 --- a/G-Earth/src/main/resources/gearth/services/internal_extensions/extensionstore/application/webview/index.html +++ b/G-Earth/src/main/resources/gearth/services/internal_extensions/extensionstore/application/webview/index.html @@ -36,7 +36,7 @@