Compare commits
No commits in common. "master" and "1.2" have entirely different histories.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
#Tue Apr 28 20:17:19 CEST 2020
|
|
||||||
gradle.version=4.8.1
|
|
Binary file not shown.
12
build.gradle
12
build.gradle
@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
|
|||||||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||||
|
|
||||||
|
|
||||||
version = "1.6"
|
version = "1.2"
|
||||||
group = "ch.m4th1eu.richpresence" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group = "ch.m4th1eu.richpresence" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = "richpresence"
|
archivesBaseName = "richpresence"
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ compileJava {
|
|||||||
minecraft {
|
minecraft {
|
||||||
version = "1.12.2-14.23.5.2768"
|
version = "1.12.2-14.23.5.2768"
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
|
|
||||||
// the mappings can be changed at any time, and must be in the following format.
|
// the mappings can be changed at any time, and must be in the following format.
|
||||||
// snapshot_YYYYMMDD snapshot are built nightly.
|
// snapshot_YYYYMMDD snapshot are built nightly.
|
||||||
// stable_# stables are built at the discretion of the MCP team.
|
// stable_# stables are built at the discretion of the MCP team.
|
||||||
@ -39,7 +39,7 @@ dependencies {
|
|||||||
// or you may define them like so..
|
// or you may define them like so..
|
||||||
//compile "some.group:artifact:version:classifier"
|
//compile "some.group:artifact:version:classifier"
|
||||||
//compile "some.group:artifact:version"
|
//compile "some.group:artifact:version"
|
||||||
|
|
||||||
// real examples
|
// real examples
|
||||||
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
||||||
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
||||||
@ -66,11 +66,11 @@ processResources {
|
|||||||
// replace stuff in mcmod.info, nothing else
|
// replace stuff in mcmod.info, nothing else
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include 'mcmod.info'
|
include 'mcmod.info'
|
||||||
|
|
||||||
// replace version and mcversion
|
// replace version and mcversion
|
||||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy everything else except the mcmod.info
|
// copy everything else except the mcmod.info
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
exclude 'mcmod.info'
|
exclude 'mcmod.info'
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
16
classes/production/discord-presence_main/mcmod.info
Normal file
16
classes/production/discord-presence_main/mcmod.info
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"modid": "richpresence",
|
||||||
|
"name": "Discord Rich Presence Mod",
|
||||||
|
"description": "Un mod pour ajouter Rich Presence",
|
||||||
|
"version": "1.0",
|
||||||
|
"mcversion": "1.12.2",
|
||||||
|
"url": "https://mathieubroillet.ch/",
|
||||||
|
"updateUrl": "",
|
||||||
|
"authorList": ["M4TH1EU_"],
|
||||||
|
"credits": "RPC Lib author(s)",
|
||||||
|
"logoFile": "",
|
||||||
|
"screenshots": [],
|
||||||
|
"dependencies": []
|
||||||
|
}
|
||||||
|
]
|
7
classes/production/discord-presence_main/pack.mcmeta
Normal file
7
classes/production/discord-presence_main/pack.mcmeta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"description": "examplemod resources",
|
||||||
|
"pack_format": 3,
|
||||||
|
"_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)."
|
||||||
|
}
|
||||||
|
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
6
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Tue Apr 28 20:22:31 CEST 2020
|
#Fri Jul 19 19:58:39 CEST 2019
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
|
||||||
|
110
gradlew
vendored
110
gradlew
vendored
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
@ -6,6 +6,47 @@
|
|||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn ( ) {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die ( ) {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
fi
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
PRG="$0"
|
||||||
@ -20,49 +61,9 @@ while [ -h "$PRG" ] ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
SAVED="`pwd`"
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
cd "`dirname \"$PRG\"`/" >&-
|
||||||
APP_HOME="`pwd -P`"
|
APP_HOME="`pwd -P`"
|
||||||
cd "$SAVED" >/dev/null
|
cd "$SAVED" >&-
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=`basename "$0"`
|
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS=""
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD="maximum"
|
|
||||||
|
|
||||||
warn () {
|
|
||||||
echo "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
die () {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
nonstop=false
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN* )
|
|
||||||
cygwin=true
|
|
||||||
;;
|
|
||||||
Darwin* )
|
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
@ -113,7 +114,6 @@ fi
|
|||||||
if $cygwin ; then
|
if $cygwin ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
@ -154,19 +154,11 @@ if $cygwin ; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape application args
|
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||||
save () {
|
function splitJvmOpts() {
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
JVM_OPTS=("$@")
|
||||||
echo " "
|
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||||
|
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
||||||
|
14
gradlew.bat
vendored
14
gradlew.bat
vendored
@ -8,14 +8,14 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS=
|
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
@ -46,9 +46,10 @@ echo location of your Java installation.
|
|||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windows variants
|
@rem Get command-line arguments, handling Windowz variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
@ -59,6 +60,11 @@ set _SKIP=2
|
|||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
|
goto execute
|
||||||
|
|
||||||
|
:4NT_args
|
||||||
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
@ -4,19 +4,16 @@ import ch.m4th1eu.json.JSONObject;
|
|||||||
import ch.m4th1eu.richpresence.events.AdvancedStatusEvent;
|
import ch.m4th1eu.richpresence.events.AdvancedStatusEvent;
|
||||||
import ch.m4th1eu.richpresence.events.EventPresence;
|
import ch.m4th1eu.richpresence.events.EventPresence;
|
||||||
import ch.m4th1eu.richpresence.proxy.CommonProxy;
|
import ch.m4th1eu.richpresence.proxy.CommonProxy;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
import net.minecraftforge.fml.common.SidedProxy;
|
import net.minecraftforge.fml.common.SidedProxy;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author M4TH1EU_#0001
|
* @author M4TH1EU_#0001
|
||||||
@ -25,11 +22,7 @@ import java.io.InputStreamReader;
|
|||||||
public class Main {
|
public class Main {
|
||||||
public static final String MODID = "richpresence";
|
public static final String MODID = "richpresence";
|
||||||
public static final String NAME = "Discord Rich Presence";
|
public static final String NAME = "Discord Rich Presence";
|
||||||
public static final String VERSION = "1.5";
|
public static final String VERSION = "1.2";
|
||||||
|
|
||||||
@Mod.Instance(Main.MODID)
|
|
||||||
public static Main instance;
|
|
||||||
|
|
||||||
@SidedProxy(clientSide = "ch.m4th1eu.richpresence.proxy.ClientProxy", serverSide = "ch.m4th1eu.richpresence.proxy.CommonProxy")
|
@SidedProxy(clientSide = "ch.m4th1eu.richpresence.proxy.ClientProxy", serverSide = "ch.m4th1eu.richpresence.proxy.CommonProxy")
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
@ -37,56 +30,103 @@ public class Main {
|
|||||||
* Variables pour la config
|
* Variables pour la config
|
||||||
*/
|
*/
|
||||||
public static String applicationId, largeimage, largeimagetext;
|
public static String applicationId, largeimage, largeimagetext;
|
||||||
public static String config_file_text = "";
|
|
||||||
public static JSONObject config_object;
|
|
||||||
|
|
||||||
|
|
||||||
public static Logger logger;
|
public static Logger logger;
|
||||||
public EventPresence rpcClient;
|
public EventPresence rpcClient;
|
||||||
|
|
||||||
|
|
||||||
|
public Main() {
|
||||||
|
MinecraftForge.EVENT_BUS.register(new AdvancedStatusEvent());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
logger = event.getModLog();
|
logger = event.getModLog();
|
||||||
proxy.preInit(event.getSuggestedConfigurationFile());
|
proxy.preInit(event.getSuggestedConfigurationFile());
|
||||||
|
|
||||||
|
|
||||||
//Configuration
|
//Configuration
|
||||||
event.getModConfigurationDirectory().mkdir();
|
event.getModConfigurationDirectory().mkdir();
|
||||||
|
File config_file = new File(event.getModConfigurationDirectory(), "\\" + Main.MODID + ".json");
|
||||||
|
if (!config_file.exists()) {
|
||||||
InputStream in = getClass().getResourceAsStream("/config/richpresence.json");
|
try {
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
event.getModLog().warn("Impossible de charger la configuration du mod : " + Main.MODID);
|
||||||
|
event.getModLog().warn("Création du fichier de configuration");
|
||||||
try {
|
config_file.createNewFile();
|
||||||
config_file_text = IOUtils.toString(reader);
|
} catch (IOException ex) {
|
||||||
config_object = new JSONObject(config_file_text);
|
ex.printStackTrace();
|
||||||
reader.close();
|
}
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_file_text != null || config_file_text.length() < 10) {
|
if (config_file.length() < 10) {
|
||||||
event.getModLog().warn("Impossible de charger la configuration du mod : " + Main.MODID);
|
try {
|
||||||
|
PrintWriter writer = new PrintWriter(config_file, "UTF-8");
|
||||||
|
writer.println("{\n" +
|
||||||
|
" \"_comment\": \"Variables disponibles :\",\n" +
|
||||||
|
" \"_comment2\": \"%player-name% - Nom du joueur.\",\n" +
|
||||||
|
" \"_comment3\": \"%server-connected-player% - Nombre de joueur connecté au serveur.\",\n" +
|
||||||
|
" \"_comment4\": \"%server-max-slot% - Nombre de slots du serveur\",\n" +
|
||||||
|
" \"server-ip\": \"mc.hypixel.net\",\n" +
|
||||||
|
" \"server-port\": \"25565\",\n" +
|
||||||
|
" \"application-settings\": {\n" +
|
||||||
|
" \"applicationID\": \"601875975533232158\",\n" +
|
||||||
|
" \"large-image-name\": \"discord_logo\",\n" +
|
||||||
|
" \"large-image-text\": \"En train de tester ce mod !\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"advanced-status-custom\": {\n" +
|
||||||
|
" \"onJoinServer\": {\n" +
|
||||||
|
" \"enable\": true,\n" +
|
||||||
|
" \"message\": \"En jeu.\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"onQuitServer\": {\n" +
|
||||||
|
" \"enable\": true,\n" +
|
||||||
|
" \"message\": \"Dans le menu principal.\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"inPauseMenu\": {\n" +
|
||||||
|
" \"enable\": true,\n" +
|
||||||
|
" \"message\": \"Dans le menu pause.\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"inMainMenu\": {\n" +
|
||||||
|
" \"enable\": true,\n" +
|
||||||
|
" \"message\": \"Dans le menu principal.\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"inInventory\": {\n" +
|
||||||
|
" \"enable\": false,\n" +
|
||||||
|
" \"message\": \"Dans l'inventaire.\"\n" +
|
||||||
|
" }\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}");
|
||||||
|
writer.close();
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JSONObject config = new JSONObject(Utils.readFileToString(config_file));
|
||||||
|
|
||||||
|
applicationId = config.getJSONObject("application-settings").getString("applicationID");
|
||||||
|
largeimage = config.getJSONObject("application-settings").getString("large-image-name");
|
||||||
|
largeimagetext = Utils.replaceArgsString(config.getJSONObject("application-settings").getString("large-image-text"));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void init(FMLInitializationEvent event) {
|
public void init(FMLInitializationEvent event) {
|
||||||
MinecraftForge.EVENT_BUS.register(instance);
|
JSONObject config = new JSONObject(Utils.readFileToString(new File(Minecraft.getMinecraft().mcDataDir, "\\config\\" + Main.MODID + ".json")));
|
||||||
MinecraftForge.EVENT_BUS.register(new AdvancedStatusEvent());
|
|
||||||
|
|
||||||
|
|
||||||
applicationId = config_object.getJSONObject("application-settings").getString("applicationID");
|
|
||||||
largeimage = config_object.getJSONObject("application-settings").getString("large-image-name");
|
|
||||||
largeimagetext = Utils.instance.replaceArgsString(config_object.getJSONObject("application-settings").getString("large-image-text"));
|
|
||||||
|
|
||||||
proxy.init();
|
proxy.init();
|
||||||
rpcClient = new EventPresence();
|
rpcClient = new EventPresence();
|
||||||
|
|
||||||
proxy.rpcinit();
|
|
||||||
|
|
||||||
if (config_object.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu").getBoolean("enable")) {
|
proxy.rpcinit();
|
||||||
proxy.rpcupdate(config_object.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu").getString("message"), null, true);
|
if (config.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu").getBoolean("enable")) {
|
||||||
|
proxy.rpcupdate(config.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu").getString("message"), null, false);
|
||||||
} else {
|
} else {
|
||||||
proxy.rpcupdate("", null, false);
|
proxy.rpcupdate("", null, false);
|
||||||
}
|
}
|
||||||
|
@ -2,20 +2,41 @@ package ch.m4th1eu.richpresence;
|
|||||||
|
|
||||||
import ch.m4th1eu.json.JSONObject;
|
import ch.m4th1eu.json.JSONObject;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.network.INetHandler;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
||||||
public static final Utils instance = new Utils();
|
/**
|
||||||
public static int status = 0;
|
* @author Nathanaël#4314
|
||||||
|
*/
|
||||||
|
public static String readFileToString(final File file) {
|
||||||
|
try {
|
||||||
|
final BufferedReader reader = new BufferedReader(new FileReader(file));
|
||||||
|
final StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
String line;
|
||||||
|
final String ls = System.getProperty("line.separator");
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
stringBuilder.append(line);
|
||||||
|
stringBuilder.append(ls);
|
||||||
|
}
|
||||||
|
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
||||||
|
reader.close();
|
||||||
|
return stringBuilder.toString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "ERROR";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Nathanael
|
||||||
|
*/
|
||||||
public static String readTextFromURL(String url) throws IOException {
|
public static String readTextFromURL(String url) throws IOException {
|
||||||
URL urlObject;
|
URL urlObject;
|
||||||
URLConnection uc;
|
URLConnection uc;
|
||||||
@ -28,7 +49,7 @@ public class Utils {
|
|||||||
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
|
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
|
||||||
uc.getInputStream();
|
uc.getInputStream();
|
||||||
InputStream is = uc.getInputStream();
|
InputStream is = uc.getInputStream();
|
||||||
BufferedReader in = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
|
BufferedReader in = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
|
||||||
|
|
||||||
int ch;
|
int ch;
|
||||||
while ((ch = in.read()) != -1) {
|
while ((ch = in.read()) != -1) {
|
||||||
@ -40,49 +61,53 @@ public class Utils {
|
|||||||
/**
|
/**
|
||||||
* @author M4TH1EU_
|
* @author M4TH1EU_
|
||||||
*/
|
*/
|
||||||
public String replaceArgsString(String variable) {
|
public static String replaceArgsString(String variable) {
|
||||||
String serverip = Main.config_object.getString("server-ip");
|
File config_file = new File(Minecraft.getMinecraft().mcDataDir, "\\config\\" + Main.MODID + ".json");
|
||||||
String serverport = Main.config_object.getString("server-port");
|
JSONObject config = new JSONObject(Utils.readFileToString(config_file));
|
||||||
|
|
||||||
|
String serverip = config.getString("server-ip");
|
||||||
|
String serverport = config.getString("server-port");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
variable = variable.replaceAll("%player-name%", Minecraft.getMinecraft().getSession().getUsername());
|
variable = variable.replaceAll("%player-name%", Minecraft.getMinecraft().getSession().getUsername());
|
||||||
variable = variable.replaceAll("%server-connected-player%",
|
variable = variable.replaceAll("%server-connected-player%", readTextFromURL("https://minecraft-api.com/api/ping/playeronline.php?ip=" + serverip + "&port=" + serverport));
|
||||||
readTextFromURL("https://api.serveurs-minecraft.com/api.php?Joueurs_En_Ligne_Ping&ip=" + serverip + "&port=" + serverport));
|
variable = variable.replaceAll("%server-max-slot%", readTextFromURL("https://minecraft-api.com/api/ping/maxplayer.php?ip=" + serverip + "&port=" + serverport));
|
||||||
variable = variable.replaceAll("%server-max-slot%", readTextFromURL("https://api.serveurs-minecraft.com/api.php?Joueurs_Maximum_Ping&ip=" + serverip + "&port=" + serverport));
|
} catch (Exception e) {
|
||||||
|
|
||||||
System.out.println(readTextFromURL("https://api.serveurs-minecraft.com/api.php?Joueurs_En_Ligne_Ping&ip=" + serverip + "&port=" + serverport));
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return variable;
|
return variable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateStatus(int id) {
|
public static void updateStatus(int id) {
|
||||||
Thread t = new Thread(() -> {
|
Thread t = new Thread(() -> {
|
||||||
|
JSONObject config = new JSONObject(Utils.readFileToString(new File(Minecraft.getMinecraft().mcDataDir, "\\config\\" + Main.MODID + ".json")));
|
||||||
status = id;
|
JSONObject onQuitServer = config.getJSONObject("advanced-status-custom").getJSONObject("onQuitServer");
|
||||||
|
JSONObject onJoinServer = config.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer");
|
||||||
JSONObject onQuitServer = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("onQuitServer");
|
JSONObject inPauseMenu = config.getJSONObject("advanced-status-custom").getJSONObject("inPauseMenu");
|
||||||
JSONObject onJoinServer = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer");
|
JSONObject inMainMenu = config.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu");
|
||||||
JSONObject inPauseMenu = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("inPauseMenu");
|
JSONObject inInventory = config.getJSONObject("advanced-status-custom").getJSONObject("inInventory");
|
||||||
JSONObject inMainMenu = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu");
|
|
||||||
JSONObject inInventory = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("inInventory");
|
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
Main.proxy.rpcupdate(Utils.replaceArgsString(config.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu").getString("message")), null, false);
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Main.proxy.rpcupdate(replaceArgsString(onJoinServer.getString("message")), getState(onJoinServer), false);
|
Main.proxy.rpcupdate(Utils.replaceArgsString(onJoinServer.getString("message")), null, false);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Main.proxy.rpcupdate(replaceArgsString(onQuitServer.getString("message")), getState(onQuitServer), false);
|
Main.proxy.rpcupdate(Utils.replaceArgsString(onQuitServer.getString("message")), null, false);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Main.proxy.rpcupdate(replaceArgsString(inPauseMenu.getString("message")), getState(inPauseMenu), false);
|
Main.proxy.rpcupdate(Utils.replaceArgsString(inPauseMenu.getString("message")), null, false);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Main.proxy.rpcupdate(replaceArgsString(inMainMenu.getString("message")), getState(inMainMenu), false);
|
Main.proxy.rpcupdate(Utils.replaceArgsString(inMainMenu.getString("message")), null, false);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
Main.proxy.rpcupdate(replaceArgsString(inInventory.getString("message")), getState(inInventory), false);
|
Main.proxy.rpcupdate(Utils.replaceArgsString(inInventory.getString("message")), null, false);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
Main.proxy.rpcupdate(Utils.replaceArgsString(config.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer").getString("message")), null, false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -90,17 +115,8 @@ public class Utils {
|
|||||||
});
|
});
|
||||||
|
|
||||||
t.start();
|
t.start();
|
||||||
}
|
|
||||||
|
|
||||||
private String getState(JSONObject jsonObject) {
|
|
||||||
String state = replaceArgsString(Main.config_object.getString("state"));
|
|
||||||
System.out.println(state);
|
|
||||||
|
|
||||||
if (jsonObject.getBoolean("showState")) {
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,74 +3,74 @@ package ch.m4th1eu.richpresence.events;
|
|||||||
import ch.m4th1eu.json.JSONObject;
|
import ch.m4th1eu.json.JSONObject;
|
||||||
import ch.m4th1eu.richpresence.Main;
|
import ch.m4th1eu.richpresence.Main;
|
||||||
import ch.m4th1eu.richpresence.Utils;
|
import ch.m4th1eu.richpresence.Utils;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiIngameMenu;
|
import net.minecraft.client.gui.GuiIngameMenu;
|
||||||
import net.minecraft.client.gui.GuiMainMenu;
|
import net.minecraft.client.gui.GuiMainMenu;
|
||||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||||
|
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|
||||||
import net.minecraftforge.fml.common.network.FMLNetworkEvent;
|
import net.minecraftforge.fml.common.network.FMLNetworkEvent;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author M4TH1EU_#0001
|
* @author M4TH1EU_#0001
|
||||||
*/
|
*/
|
||||||
@Mod.EventBusSubscriber
|
@Mod.EventBusSubscriber
|
||||||
public class AdvancedStatusEvent {
|
public class AdvancedStatusEvent {
|
||||||
|
|
||||||
@SubscribeEvent
|
File config_file = new File(Minecraft.getMinecraft().mcDataDir, "\\config\\" + Main.MODID + ".json");
|
||||||
public void onTickEvent(TickEvent.WorldTickEvent event) {
|
JSONObject config = new JSONObject(Utils.readFileToString(config_file));
|
||||||
if (event.world.getTotalWorldTime() % 1024 == 0) {
|
|
||||||
Utils.instance.updateStatus(Utils.status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onJoinServer(FMLNetworkEvent.ClientConnectedToServerEvent event) {
|
public void onJoinServer(FMLNetworkEvent.ClientConnectedToServerEvent event) {
|
||||||
JSONObject onJoinServer = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer");
|
JSONObject onJoinServer = config.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer");
|
||||||
|
|
||||||
if (onJoinServer.getBoolean("enable")) {
|
if (onJoinServer.getBoolean("enable")) {
|
||||||
Utils.instance.updateStatus(1);
|
Utils.updateStatus(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onQuitServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
|
public void onQuitServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
|
||||||
JSONObject onQuitServer = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("onQuitServer");
|
JSONObject onQuitServer = config.getJSONObject("advanced-status-custom").getJSONObject("onQuitServer");
|
||||||
|
|
||||||
if (onQuitServer.getBoolean("enable")) {
|
if (onQuitServer.getBoolean("enable")) {
|
||||||
Utils.instance.updateStatus(2);
|
Utils.updateStatus(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onGuiOpen(GuiOpenEvent event) {
|
public void onGuiOpen(GuiOpenEvent event) {
|
||||||
|
|
||||||
JSONObject inPauseMenu = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("inPauseMenu");
|
JSONObject inPauseMenu = config.getJSONObject("advanced-status-custom").getJSONObject("inPauseMenu");
|
||||||
JSONObject inMainMenu = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu");
|
JSONObject inMainMenu = config.getJSONObject("advanced-status-custom").getJSONObject("inMainMenu");
|
||||||
JSONObject inInventory = Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("inInventory");
|
JSONObject inInventory = config.getJSONObject("advanced-status-custom").getJSONObject("inInventory");
|
||||||
|
|
||||||
if (inPauseMenu.getBoolean("enable")) {
|
if (inPauseMenu.getBoolean("enable")) {
|
||||||
if (event.getGui() instanceof GuiIngameMenu) {
|
if (event.getGui() instanceof GuiIngameMenu) {
|
||||||
Utils.instance.updateStatus(3);
|
Utils.updateStatus(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inMainMenu.getBoolean("enable")) {
|
if (inMainMenu.getBoolean("enable")) {
|
||||||
if (event.getGui() instanceof GuiMainMenu) {
|
if (event.getGui() instanceof GuiMainMenu) {
|
||||||
Utils.instance.updateStatus(4);
|
Utils.updateStatus(4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inInventory.getBoolean("enable")) {
|
if (inInventory.getBoolean("enable")) {
|
||||||
if (event.getGui() instanceof GuiInventory) {
|
if (event.getGui() instanceof GuiInventory) {
|
||||||
Utils.instance.updateStatus(5);
|
Utils.updateStatus(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getGui() == null) {
|
if (event.getGui() == null) {
|
||||||
if (Main.config_object.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer").getBoolean("enable")) {
|
if (config.getJSONObject("advanced-status-custom").getJSONObject("onJoinServer").getBoolean("enable")) {
|
||||||
Utils.instance.updateStatus(1);
|
Utils.updateStatus(6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,11 @@ import net.arikia.dev.drpc.DiscordRichPresence;
|
|||||||
*/
|
*/
|
||||||
public class EventPresence {
|
public class EventPresence {
|
||||||
|
|
||||||
public static long oldTime;
|
|
||||||
private static Thread callbackRunner;
|
private static Thread callbackRunner;
|
||||||
|
|
||||||
public synchronized static void init() {
|
public synchronized static void init() {
|
||||||
DiscordEventHandlers handlers = new DiscordEventHandlers();
|
DiscordEventHandlers handlers = new DiscordEventHandlers();
|
||||||
DiscordRPC.discordInitialize(Main.applicationId, handlers, true);
|
DiscordRPC.discordInitialize(Main.applicationId, handlers, true, null);
|
||||||
if (EventPresence.callbackRunner == null) {
|
if (EventPresence.callbackRunner == null) {
|
||||||
(EventPresence.callbackRunner = new Thread(() -> {
|
(EventPresence.callbackRunner = new Thread(() -> {
|
||||||
while (!Thread.currentThread().isInterrupted()) {
|
while (!Thread.currentThread().isInterrupted()) {
|
||||||
@ -27,7 +26,7 @@ public class EventPresence {
|
|||||||
Main.logger.info("EventPresence has been started.");
|
Main.logger.info("EventPresence has been started.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updatePresence(String details, String action, Boolean changeTime) {
|
public synchronized static void updatePresence(String details, String action, Boolean changeTime) {
|
||||||
DiscordRichPresence presence = new DiscordRichPresence();
|
DiscordRichPresence presence = new DiscordRichPresence();
|
||||||
presence.largeImageKey = Main.largeimage;
|
presence.largeImageKey = Main.largeimage;
|
||||||
presence.largeImageText = Main.largeimagetext;
|
presence.largeImageText = Main.largeimagetext;
|
||||||
@ -36,13 +35,8 @@ public class EventPresence {
|
|||||||
|
|
||||||
if (changeTime) {
|
if (changeTime) {
|
||||||
presence.startTimestamp = System.currentTimeMillis() / 1000L;
|
presence.startTimestamp = System.currentTimeMillis() / 1000L;
|
||||||
oldTime = presence.startTimestamp;
|
|
||||||
} else {
|
|
||||||
presence.startTimestamp = oldTime;
|
|
||||||
}
|
}
|
||||||
}
|
} else if (action != null) {
|
||||||
|
|
||||||
if (action != null) {
|
|
||||||
presence.state = action;
|
presence.state = action;
|
||||||
}
|
}
|
||||||
DiscordRPC.discordUpdatePresence(presence);
|
DiscordRPC.discordUpdatePresence(presence);
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
"_comment": "Variables disponibles :",
|
|
||||||
"_comment2": "%player-name% - Nom du joueur.",
|
|
||||||
"_comment3": "%server-connected-player% - Nombre de joueur connecté au serveur.",
|
|
||||||
"_comment4": "%server-max-slot% - Nombre de slots du serveur",
|
|
||||||
"server-ip": "mc.hypixel.net",
|
|
||||||
"server-port": "25565",
|
|
||||||
"state": "%server-connected-player%/%server-max-slot% joueurs connectés",
|
|
||||||
"application-settings": {
|
|
||||||
"applicationID": "601875975533232158",
|
|
||||||
"large-image-name": "discord_logo",
|
|
||||||
"large-image-text": "En train de tester ce mod !"
|
|
||||||
},
|
|
||||||
"advanced-status-custom": {
|
|
||||||
"onJoinServer": {
|
|
||||||
"enable": true,
|
|
||||||
"showState": true,
|
|
||||||
"message": "En jeu."
|
|
||||||
},
|
|
||||||
"onQuitServer": {
|
|
||||||
"enable": true,
|
|
||||||
"showState": false,
|
|
||||||
"message": "Dans le menu principal."
|
|
||||||
},
|
|
||||||
"inPauseMenu": {
|
|
||||||
"enable": true,
|
|
||||||
"showState": true,
|
|
||||||
"message": "Dans le menu pause."
|
|
||||||
},
|
|
||||||
"inMainMenu": {
|
|
||||||
"enable": true,
|
|
||||||
"showState": false,
|
|
||||||
"message": "Dans le menu principal."
|
|
||||||
},
|
|
||||||
"inInventory": {
|
|
||||||
"enable": false,
|
|
||||||
"showState": true,
|
|
||||||
"message": "Dans l'inventaire."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user