-
Notifications
You must be signed in to change notification settings - Fork 25
Home
Installation on a proxy server (BungeeCord/Waterfall/Velocity)
- Download a
JPremium-XXX.jar
file from spigotmc.org or builtbybit.com. - Navigate to your
plugins
directory on your proxy server and then place theJPremium-XXX.jar
file in that directory. - Fully start and stop your proxy server to allow default JPremium configurations to be generated.
- Open the JPremium configuration file which is located at
plugins/JPremium/configuration.yml
. - Enter limbo and main server names in
limboServerNames
andmainServerNames
options. All server names, you can find in theconfig.yml
orconfig.toml
file in the directory where you have your proxy server. They are stored in a list, so they have to be between parenthesis -[]
, not apostrophes! The limbo server is the server where players need to authorize. The main server is the server where players go after success authorization. Look at these photos: PHOTO1, PHOTO2. - If you are using BungeeCord:
- Set the
ip_forward
setting totrue
in theconfig.yml
file on your BungeeCord server. - Set the
bungeecord
setting totrue
in thespigot.yml
file on every Spigot server.
- Set the
- If you are using Velocity:
- Follow instruction how to configure player information forwarding on your Velocity server: https://docs.papermc.io/velocity/player-information-forwarding
- If you want to use the legacy mode, you need to set
accessTokenDisabled
to true in your JPremium configuration files on your back-end servers. JPremium won't check any passing data to your back-end servers, so your servers will work in an insecure mode!
- Start your server again.
Installation on a back-end server (Spigot/PaperSpigot) - Optional installation
- Download a
JPremium-XXX.jar
file from spigotmc.org or builtbybit.com. - Navigate to your
plugins
directory on your back-end server and then place theJPremium-XXX.jar
file in that directory. - Fully start and stop your back-end server to allow default JPremium configurations to be generated.
- Open the JPremium configuration file which is located at
plugins/JPremium/configuration.yml
. - Copy the JPremium access token from your JPremium configuration on your proxy server and paste it into the
accessToken
option in your JPremium configuration in the back-end server. - Set the
captchaMapSlot
option to the slot number where JPremium should place the captcha map in a player inventory. - Start your server again.
Please backup your database which you want to convert in order not to lose data! Before converting you have to install correctly the latest JPremium version on your proxy server, so please firstly follow instructions on this wiki page. You have to have default tables and columns names in the database from which you convert! The converter converts data only to a MySQL database. Please remember that converting from AuthMe works only if you have passwords hashed in SHA-256 or Bcrypt. Converting from DynamicBungeeAuth may not work correctly in all cases! Converting from DynamicBungeeAuth works only if you have password hashed in SHA-256 or SHA-512 and all premium players have online UUIDs.
- Download a
Converter-<VERSION>.jar
file from this site. - Navigate to your
plugins
directory on your BungeeCord server. Then place theConverter.jar
file in that directory. - Fully stop and start your BungeeCord server to allow a default configuration to be generated.
- The configuration will be located at
plugins/Converter/configuration.yml
. - Open the configuration file on your BungeeCord server.
- Enter a plugin name in
convertFrom
which a database you want to convert. - Enter your JPremium database credentials in
newStorage
. - Enter database credentials from which you want to convert in
<plugin-name>Storage
. If you convert a local database, enter a database file path inlocal
. - Start your BungeeCord server and wait until converting will finish.
- After successful converting, remove the
Converter.jar
file from your BungeeCord server. - Start your BungeeCord server again.
First of all, please remember that database connection issues are never caused by JPremium. The plugin uses the official driver. Your issues probably are caused by your wrong database configuration or the connection between your database and your proxy server. Here you have the most common solutions fot the most common issues:
-
Connection refused
- You probably did not enter database credentials in the JPremium configuration or you entered wrong database credentials (an IP address and a port) in the JPremium configuration or your database is not reachable from your proxy. -
Access denied for user 'root'@'localhost' (using password: YES)
- You need to grant permission in your database. Please execute these queries in your database:GRANT ALL PRIVILEGES ON <database>.* TO '<username>'@'%'
(replace<database>
with your database name and<username>
with your database username) and thenFLUSH PRIVILEGES
. -
Public Key Retrieval is not allowed
- You can fix it by setting thestorageProperties
option in your JPremium configuration file to[allowPublicKeyRetrieval=true, useSSL=false]
. -
Failed to validate connection com.mysql.jdbc.JDBC4Connection@XXX (No operations allowed after connection closed.).
- TheconnectionPoolLifetime
option in the JPremium configuration must be less then thewait_timeout
setting in your database. It does not matter which value you change, so long as theconnectionPoolLifetime
option is less than thewait_timeout
setting. Remember that the units of each value are different (connectionPoolLifetime
is in miliseconds,wait_timeout
is in seconds)! To check thewait_timeout
setting, execute this query in your database:SHOW GLOBAL VARIABLES LIKE "wait_timeout"
- to change it, execute:SET GLOBAL wait_timeout = <new-time>
.
If you get any other errors which are not described above, please do NOT report it to the JPremium author because it is not related with JPremium. If you do not know how to fix it, please google it!
JPremium has the feature which allows to players register from your website.
- Download the website from this site.
- Open the
Website
directory in the zip file and uploadindex.php
andbackground.jpg
files into your website. - Register your website on Google re-captcha site to be able to use re-captcha. You have to register re-captcha v2!
- Open the
index.php
file on your website. - Enter connection data with your database in the storage section, re-captcha data in the Google re-captcha section.
- Enter the same value which you have in
fixedUniqueIds
in your JPremium configuration file on your proxy server in the JPremium section. - Set the
registerOnWebsite
option to 1 (registration on server and website) or 2 (registration on website only) in your JPremium configuration file on your proxy server.
Since Minecraft 1.8 all player data is stored using UUIDs (Universal Unique Identifier), not using nicknames. It was added to premium players can change nicknames without losing data. An example UUID looks like: d2affeb6-96a8-4c71-b4d6-b79f962b6309. All servers in the online mode use online UUIDs (got from Mojang servers) and all servers in the offline mode use offline UUIDs (generated using a player nickname).
JPremium alters all player UUIDs to avoid UUID collisions. There are three modes:
-
REAL
uses a Mojang's UUID for premium players and offline for cracked players. Highly recommended. -
OFFLINE
derives a UUID from a username. -
FIXED
generates a random UUID on the first join. Deprecated and should be only used for backwards compatibility.
Check out the table below to understand the differences between each mode of UUID:
Feature | REAL | OFFLINE | |
---|---|---|---|
Premium players can change a username | ✅ | ❌ | ✅ |
Premium players can see cosmetics on modified clients (e.g. LunarClient) | ✅ | ❌ | ❌ |
Players can switch an account type (/premium, /cracked) | ❌ | ✅ | ✅ |
Cracked players can use a premium username (*) | ✅ | ✅ | ✅ |
No issues with signatures | ✅ | ❌ | ❌ |
When you use JPremium on the server where players played before installing, you have to correctly set uniqueIdsType
to represent UUIDs which players have. If you have a server in the offline mode, you probably should select the OFFLINE
mode. If you have a server in the online mode, you probably should select the REAL
mode.
If floodgateSupport
is enabled, JPremium does not touch UUIDs of Bedrock players.
(*) By default JPremium does not allow cracked player to use a premium nickname. If you want to change it, please follow this steps: https://github.com/Jakubson/JPremiumCleared/wiki#joining-issues
JPremium supports only premium Bedrock players. It does NOT support cracked Bedrock players!
When you enable support for Bedrock Edition in JPremium, all Bedrock players will have a bedrock UUID. So, if you have already some Bedrock players on your server and you want to enable support for it, they will lose all data because they will have a new bedrock UUID, not an offline UUID or a fixed UUID as now. Bedrock players also cannot execute any JPremium commands. Bedrock players are automatically registered and logged, so you need to set Floodgate that only premium Bedrock players can join to your server.
- Install correctly GeyserMC 2.0 and Floodgate 2.0 on your server.
- In your Floodgate configuration file, you have to set a prefix in the
username-prefix
option (you must select*
or.
and you have to enable that option otherwise nicknames collisions may occur - you CANNOT usea-z
,A-Z
,0-9
and_
because then Java and Bedrock players may have the same nickname!). Then enable thereplace-spaces
option, disableplayer-link.enable
option. - In your JPremium configuration on your proxy server, enable the
floodgateSupport
option. - Fully restart your proxy server.
If some players cannot join to your server, those players are probably cracked players with premium nicknames. You have two solutions for that (choose only one solution!). If you are using the REAL mode, you can only choose the second solution!
THE VERY IMPORTANT NOTE! YOU CAN ONLY FOLLOW ONE OF THE BELOW POINTS - YOU CAN'T FOLLOW BOTH!
- Please set
registerPremiumUsers
tofalse
in your JPremium configuration file on your proxy server. Now all new players have to register and login every joining. If new premium players do not want to use the/login
command, they can execute the/premium
command to auto login the next time. That soltuion work correctly on if you have FIXED UUIDs or OFFLINE UUIDs in the JPremium. - Please set
secondLoginCracked
totrue
in your JPremium configuration file on your proxy server. Now all cracked players, who use premium player nicknames which are not claimed on your server, can join, but their first connection request will be disconnected. Then they can re-join and play normally as a cracked player with a premium nickname.
Please remember that it will not affect cracked players who already joined (or tried to join) to your server. In such cases you need to execute the /forcecracked <nickname>
command via your proxy console (you need to execute the /forcecreatepassword <nickname> <any-password>
command before).
If a premium player changed their nickname, but the player has a different account after join to the server (they need to use the /login
or /register
command), the player probably changed the nickname to the nickname which was already taken by a cracked player on the server. Firstly make sure that the player who changed the nickname activated a premium mode in the account. Execute the /forceviewuserprofile <nickname-before-change>
command.
- If the command returns an account with a premium id, execute the
/forcepurgeuserprofile <nickname-after-change>
command. - If the command returns an account without a premium id, execute the
/forcemergepremiumuserprofile <nickname-after-change> <nickname-before-change>
command.
If you get [JPremium]: Could not verify a player due to rate limit! ...
message in your proxy console, it means that your server sent too many requests to the Mojang API and the Mojang API banned your host for a while. Some players will not be able to join to your server during the ban. The Mojang API automatically will unban your host after several minutes. Please do not report it to the JPremium author because they cannot do anything with that.
If you get that error even if your server isn't overloaded with players, you can enable 'useMinecraftServicesApi' option in your JPremium configuration file.
If you get that during bots attacks, you should install a good anti-bot plugin which detects and disconnect bots on the pre-login state on the proxy server (or faster). Anti-bots which, disconnect bots later than the pre-login state, will not prevent the rate limit!
A plugin tried to cancel a signed chat message / A plugin tried to deny a command with signable component(s)
Since version 1.19.1, Minecraft signs player's messages and commands to add compatibility for the chat report system. Velocity wants to keep compatibility with the chat report system and doesn't allow to edit or cancel any player's messages or commands and that's why you get the error. Velocity probably won't change it (https://github.com/PaperMC/Velocity/issues/804#issuecomment-1200445270), so the only way to forbid a player to send messages or commands before authorization is disconnecting them.
All player commands do not require any permissions to use, but all staff commands require permissions. You can edit all command aliases by adding add new option to your JPremium configuration file on your proxy server using this format <command>CommandAliases: [<alias>, <alias>, ...]
(for example: registerCommandAliases: [reg, r]
).
Player commands:
/login <password>
/register <new-password>
/unregister <password>
/changepassword <current-password> <new-password>
/createpassword <new-password>
/premium <password>
/cracked <password>
/startsession
/destroysession
/changeemailaddress <password> <email-address>
/requestpasswordrecovery <email-address>
/confirmpasswordrecovery <recovery-code> <new-password>
/requestsecondfactor
/activatesecondfactor <password> <second-factor-code>
/deactivatesecondfactor <password> <second-factor-code>
Staff commands:
-
/forcelogin <nickname>
>jpremium.command.forcelogin
-
/forceregister <nickname> <new-password>
>jpremium.command.forceregister
-
/forceunregister <nickname>
>jpremium.command.forceunregister
-
/forcechangepassword <nickname> <new-password>
>jpremium.command.forcechangepassword
-
/forcecreatepassword <nickname> <new-password>
>jpremium.command.forcecreatepassword
-
/forcepremium <nickname>
>jpremium.command.forcepremium
-
/forcecracked <nickname>
>jpremium.command.forcecracked
-
/forcestartsession <nickname>
>jpremium.command.forcestartsession
-
/forcedestroysession <nickname>
>jpremium.command.forcedestroysession
-
/forcechangeemailaddress <nickname> <email-address>
>jpremium.command.forcechangeemailaddress
-
/forcerequestpasswordrecovery <nickname>
>jpremium.command.forcerequestpasswordrecovery
-
/forceconfirmpasswordrecovery <nickname> <new-password>
>jpremium.command.forceconfirmpasswordrecovery
-
/forcerequestsecondfactor <nickname>
>jpremium.command.forcerequestsecondfactor
-
/forceactivatesecondfactor <nickname>
>jpremium.command.forceactivatesecondfactor
-
/forcedeactivatesecondfactor <nickname>
>jpremium.command.forcedeactivatesecondfactor
-
/forceviewuserprofile <nickname>
>jpremium.command.forceviewuserprofile
-
/forcepurgeuserprofile <nickname>
>jpremium.command.forcepurgeuserprofile
-
/forcemergepremiumuserprofile <current-nickname> <prefious-nickname>
>jpremium.command.forcemergepremiumuserprofile
-
/jreload
>jpremium.command.reload
Due to data synchronization process with back-end servers, placeholder values works only for online players and they are refreshed only after player joining or successful authorization (executed /login, /register, /forcelogin, /forceregister).
%jpremium_unique_id%
%jpremium_premium_id%
%jpremium_last_nickname%
%jpremium_hashed_password%
%jpremium_verification_token%
%jpremium_email_address%
%jpremium_session_expires%
%jpremium_last_server%
%jpremium_last_address%
%jpremium_last_seen%
%jpremium_first_address%
%jpremium_first_seen%
%jpremium_captcha_code%
-
%jpremium_state%
returns:PREMIUM
,LOGGED
,REGISTERED
,UNREGISTERED
orUNKNOWN
To obtain an instance of the App
class on BungeeCord, call com.jakub.premium.JPremium.getApplication();
.
To obtain an instance of the App
class on Velocity, call com.jakub.jpremium.velocity.JPremiumVelocity.getApplication();
.
The API works only on the proxy site. JavaDocs: https://jakubson.github.io/JPremiumCleared/
If you are a developer who does not have access to the full JPremium version, you can use JPremiumAPI.jar
file: https://github.com/Jakubson/JPremiumCleared/blob/master/assets/JPremium-API.jar