Git Product home page Git Product logo

games647 / fastlogin Goto Github PK

View Code? Open in Web Editor NEW
482.0 18.0 119.0 8.26 MB

Checks if a minecraft player has a valid paid account. If so, they can skip offline authentication automatically. (premium auto login)

Home Page: https://www.spigotmc.org/resources/fastlogin.14153

License: MIT License

Java 100.00%
minecraft autologin premium mixed-onlinemode offline-mode spigot-plugin bungeecord premium-uuid plugin

fastlogin's Introduction

FastLogin

Checks if a Minecraft player has a paid account (premium). If so, they can skip offline authentication (auth plugins). So they don't need to enter passwords. This is also called auto login (auto-login).

Features

  • Detect paid accounts from others
  • Automatically login paid accounts (premium)
  • Support various of auth plugins
  • Premium UUID support
  • Forward skins
  • Detect username changed and will update the existing database record
  • BungeeCord/Velocity support
  • Auto register new premium players
  • No client modifications needed
  • Good performance by using async operations
  • Locale messages
  • Support for Bedrock players proxies through FloodGate

Issues

Please use issues for bug reports, suggestions, questions and more. Please check for existing issues. Existing issues can be voted up by adding up vote to the original post. Closing issues means that they are marked as resolved. Comments are still allowed and it could be re-opened.

Development builds

Development builds contain the latest changes from the Source-Code. They are bleeding edge and could introduce new bugs, but also include features, enhancements and bug fixes that are not yet in a released version. If you click on the left side on Changes, you can see iterative change sets leading to a specific build.

You can download them from here: https://ci.codemc.org/job/Games647/job/FastLogin/


Commands

/premium [player] Label the invoker or the argument as paid account
/cracked [player] Label the invoker or the argument as cracked account

Permissions

fastlogin.bukkit.command.premium
fastlogin.bukkit.command.cracked

fastlogin.command.premium.other
fastlogin.command.cracked.other

Placeholder

This plugin supports PlaceholderAPI on Spigot. It exports the following variable %fastlogin_status%. In BungeeCord environments, the status of a player will be delivered with a delay after the player already successful joined the server. This takes about a couple of milliseconds. In this case the value will be Unknown.

Possible values: Premium, Cracked, Unknown

Requirements

  • Java: 21+ recommended for improved multi-threading code by FastLogin
    • Spigot: 8+
    • BungeeCord and Velocity: 17+
  • Server software in offlinemode:
  • An auth plugin.

Supported auth plugins

Spigot/Paper

BungeeCord/Waterfall

Network requests

This plugin performs network requests to:


How to install

Spigot/Paper

  1. Download and install ProtocolLib/ProtocolSupport
  2. Download and install FastLoginBukkit
  3. Set your server in offline mode by setting the value onlinemode in your server.properties to false

BungeeCord/Waterfall or Velocity

Install the plugin on both platforms, that is proxy (BungeeCord or Velocity) and backend server (Spigot).

  1. Activate proxy support in the server configuration
    • This is often found in spigot.yml or paper.yml
  2. Restart the backend server
  3. Now there is allowed-proxies.txt file in the FastLogin folder of the restarted server
    • BungeeCord: Put your stats-id from the BungeeCord config into this file
    • Velocity: On plugin startup the plugin generates a proxyId.txt inside the plugins folder of the proxy
  4. Activate ip forwarding in your proxy config
  5. Check your database settings in the config of FastLogin on your proxy
    • The proxies only ship with a limited set of drivers where Spigot supports more. Therefore, these are supported:
    • BungeeCord: mysql for MySQL/MariaDB
    • Velocity: mariadb for MySQL/MariaDB
    • Note the embedded file storage SQLite is not available
    • MySQL/MariaDB requires an external database server running. Check your server provider if there is one available or install one.
  6. Set proxy and Spigot in offline mode by setting the value onlinemode in your config.yml to false
  7. You should always configure the firewall for your Spigot server so that it's only accessible through your proxy

fastlogin's People

Contributors

albemiglio avatar bot-neil avatar dependabot-preview[bot] avatar dependabot[bot] avatar devleoko avatar enginecrafter77 avatar enriquegf avatar freyhold avatar games647 avatar glucy-2 avatar inkerbot avatar ishland avatar jlleitschuh avatar juanmuscaria avatar kamilkime avatar krakenied avatar lenis0012 avatar maxetto avatar mio-19 avatar norbipeti avatar oldium avatar sgdc3 avatar smart123s avatar szczurekyt avatar technicallycoded avatar vaporvee avatar wtlgo avatar xrh0905 avatar xxschrandxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastlogin's Issues

Add feature for cracked play whitelist

Hello
I was migrated from Auto-in
Auto-in has a feature:
Whitelist for cracked player, and premium player can login bypass whitelist
Can you add this feature?

2 NulPointerException with FastLogin V1.4

1: BungeeCord error occurs while cracked player join the server every time.

21:22:51 [ERRO] Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@10163d6, id=55, owner=com.github.games647.fastlogin.bungee.FastLoginBungee@58e1d9d, task=com.github.games647.fastlogin.bungee.tasks.ForceLoginTask@61879bb5, delay=0, period=0, running=true) encountered an exception
java.lang.NullPointerException
at com.github.games647.fastlogin.bungee.tasks.ForceLoginTask.run(ForceLoginTask.java:32)
at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

2: Spigot/Bukkit error occurs while premium player join the server. It shows up at the first time only and the premium player gets no auto login no meter how many time he/she re-join the game:

[21:16:41] [Server thread/WARN]: Could not pass incoming plugin message to FastLogin v1.4
java.lang.NullPointerException
at com.github.games647.fastlogin.bukkit.listener.BungeeCordListener.onPluginMessageReceived(BungeeCordListener.java:71) ~[?:?]
at org.bukkit.plugin.messaging.StandardMessenger.dispatchIncomingMessage(StandardMessenger.java:427) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.PlayerConnection.a(PlayerConnection.java:2485) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.PacketPlayInCustomPayload.a(SourceFile:58) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.PacketPlayInCustomPayload.a(SourceFile:8) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_92]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_92]
at net.minecraft.server.v1_9_R2.SystemUtils.a(SourceFile:45) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:726) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [spigot-survival.jar:git-Spigot-798f32d-0cd0397]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]

Environment:
FastLogin 1.4 from https://www.spigotmc.org/resources/fastlogin.14153/history
ProtocolLib 4.0.1
BungeeCord build 1158 http://ci.md-5.net/job/BungeeCord/1158/
Spigot 1.9.4 build 849
AuthMe 3.4 fixed with spigot BuildTools 1.9

P.S. Interestingly I tried to download the source code from github and build with mvn. it loads fine in spigot and bungee yet shows the same errors above.

MySQL weird O.o

Well, the console says this:
image

but...

driver: com.mysql.jdbc.Driver
host: 5.196.78.91
port: 3306
database: ----------
username: -------
password: -----------

[QUESTION] Bundled Translation Files

Do you accept Pull Request with bundled localization (example: messages_it.yml) inside the Jar?

Or should I only update the Wiki page with the new localization?

BungeeAuth Support

Project page: https://www.spigotmc.org/resources/bungeeauth.493/
Source code: https://github.com/MatteCarra/BungeeAuth
Maven:

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>
...
    <dependency>
        <groupId>com.github.MatteCarra</groupId>
        <artifactId>BungeeAuth</artifactId>
        <version>-1.2.1-gc367d92-8</version>
    </dependency>

Progress see bungeeHooks branch.

TODO:

  • Add auth plugin hooks for BungeeCord
  • Add BungeeAuth hook (have to workaround protected methods)
  • Call auth methods
  • Document interface hook
  • Make it async where possible to improve performance
  • Test everything

[Request] Player doesn't need to invoke command

Is there possibilty to make in config that player doesn't need to invoke command. I'm trying to make Semi-Cracked server. So if premium users join he's automaticlly registered and register him as premium, but if cracked player join he's kicked until someone register him.

I turned on in authme "kickNonRegistered" and it kicks cracked player which are not registered and i turned on autoregister in FastLogin and it register automatic premium player, so i just need to invoke automatic that's he's premium and i'll manual register cracked player and invoke command for cracked player.

loadProfile(name) returns NULL on Bukkit side when using BungeeCord.

Hi, I'm trying to catch whenever a player is Premium or not when chatting in order to identify them with a Prefix.

I'm using this function to hook into the Plugin and it's working fine on both BungeeCord and Spigot:
FastLoginBukkit plugin = (FastLoginBukkit) Bukkit.getPluginManager().getPlugin("FastLogin")

And this function to get whether a player is Premium or not (Inside AsyncPlayerChatEvent):
plugin.getCore().getStorage().loadProfile(e.getPlayer().getName()).isPremium()

This last function works fine with BungeeCord and with Spigot when "bungeecord: false".

This is the error I get:
http://pastebin.com/MmX3qbZC

Using:
Spigot 1.8.8
BungeeCord 1.7-1.8
FastLogin Commit-6c1c4e7

Support for Premium username change

Just as a reminder

If premium player Joins with a different name after he played at least once in the server an error of duplicate entry is shown in console since you cant have more than 1 row with the same uuid.

A temporal fix is to remove the unique index from the uuid rown in the database, this will allow duplicate uuids and let the player play normally. The only thing I can imagine that could happen, nopremiums player wont be able to use that nick and if by any chance a premium player gets that username and try to join the server with it, the uuid row gets updated with a new uuid without errors.

Kicked with "Server is not fully started yet" on join.

Could not join an already-fully-started server with following kick message:
Connection lost
Kicked whilst connecting to survivalserver: Server is not fully started yet. Please retry.

with:
Spigot 1.9.4 build 833
bungeecord build 1156 http://ci.md-5.net/job/BungeeCord/
ProtocolLib 4.0.1 https://www.spigotmc.org/resources/protocollib.1997/
AuthMe both 3.4(nms fixed with buildtools) and 5.2 beta 2
ProtocolSupport 4.23 build 518 http://build.true-games.org/job/ProtocolSupport/

note: Everything is fine when FastLogin is removed from Spigot side.

New thing

sorry about put this here
can you put an option to delete user?
some times premium user can't aoutologin, but when i delete de db and write /premium 2 times
they can aoutologin.
sorry about my english, i hope you can understand me
i use authme reloaded to login

FastLogin doesn't login players automatically.

# FastLogin config
# Project site: https://www.spigotmc.org/resources/fastlogin.14153
# Source code: https://github.com/games647/FastLogin
#
# You can access the newest config here:
# https://github.com/games647/FastLogin/blob/master/core/src/main/resources/config.yml

# Request a premium login without forcing the player to type a command
#
# If you activate autoRegister, this plugin will check/do these points on login:
#1. An existing cracked account shouldn't exist
# -> paid accounts cannot steal the existing account of cracked players
# - (Already registered players could still use the /premium command to activate premium checks)
#2. Automatically registers an account with a strong random generated password
# -> cracked player cannot register an account for the premium player and so cannot the steal the account
#
# Furthermore the premium player check have to be made based on the player name
# This means if a cracked player connects to the server and we request a paid account login from this player
# the player just disconnect and sees the message: 'bad login' or 'invalid session'
# There is no way to change this message
# For more information: https://github.com/games647/FastLogin#why-do-players-have-to-invoke-a-command
autoRegister: true

# If this plugin detected that a player has a premium, it can also set the associated
# uuid from that account. So if the players changes their usernames, they will still have
# the same playerdata (inventory, permissions, ...)
#
# Warning: This also means that the UUID will be different if the player is connecting
# through a offline mode connection. This **could** cause plugin compatibility issues.
#
# This is a example and doesn't apply for every plugin.
# Example: If you want to ban players who aren't online at the moment, the ban plugin will look
# after a offline uuid associated to the player, because the server is in offline mode. Then the premium
# players could still join the server, because they have different UUID.
#
# Moreover you may want to convert the offline UUID to a premium UUID. This will ensure that the player
# will have the same inventory, permissions, ... if they switched to premium authentification from offline/cracked
# authentification.
#
# This feature requires Cauldron, Spigot or a fork of Spigot (PaperSpigot, TacoSpigot)
premiumUuid: false

# This will make an additional check (only for player names which are not in the database) against the mojang servers
# in order to get the premium UUID. If that premium UUID is in the database, we can assume on sucessful login that the
# player changed it's  username and we just update the name in the database.
# Examples:
# #### Case 1
# nameChangeCheck = false ----- autoRegister = false
#
# Player logins as cracked until the player invoked the command /premium. Then we could override the existing database
# record.
#
# #### Case 2
#
# nameChangeCheck = true ----- autoRegister = false
#
# Connect the Mojang API and check what UUID the player has (UUID exists => Paid Minecraft account). If that UUID is in
# the database it's an **existing player** and FastLogin can **assume** the player is premium and changed the username.
# If it's not in the database, it's a new player and **could be a cracked player**. So we just use a offline mode
# authentication for this player.
#
# **Limitation**: Cracked players who uses the new username of a paid account cannot join the server if the database
# contains the old name. (Example: The owner of the paid account no longer plays on the server, but changed the username
# in the meanwhile).
#
# #### Case 3
#
# nameChangeCheck = false ----- autoRegister = true
#
# We will always request a premium authentication if the username is unknown to us, but is in use by a paid minecraft
# account. This means it's kind of a more aggressive check like nameChangeCheck = true and autoRegister = false, because
# it request a premium authentication which are completely new to us, that even the premium UUID is not in our database.
#
# **Limitation**: see below
#
# #### Case 4
#
# nameChangeCheck = true ----- autoRegister = true
#
# Based on autoRegister it checks if the player name is premium and login using a premium authentication. After that
# fastlogin receives the premium UUID and can update the database record.
#
# **Limitation from autoRegister**: New offline players who uses the username of an existing minecraft cannot join the
# server.
nameChangeCheck: true

# If your players have a premium account and a skin associated to their account, this plugin
# can download the data and set it to the online player.
#
# Keep in mind that this will only works if the player:
# * is the owner of the premium account
# * the serverconnection is established through a premium connection (paid account authentification)
# * has a skin
#
# This means this plugin doesn't need to create a new connection to the Mojang servers, because
# the skin data is included in the Auth-Verification-Response sent by Mojang. If you want to use for other
# players like cracked player, you have to use other plugins.
#
# If you want to use skins for your cracked player, you need an additional plugin like
# ChangeSkin, SkinRestoer, ...
forwardSkin: true

# Displays a warning message that this message SHOULD only be invoked by
# users who actually are the owner of this account. So not by cracked players
#
# If they still want to invoke the command, they have to invoke /premium again
premium-warning: true

# Database configuration
# Recommened is the use of MariaDB (a better version of MySQL)

# Single file SQLite database
# driver: org.sqlite.JDBC
# File location
# database: '{pluginDir}/FastLogin.db'

# MySQL
driver: com.mysql.jdbc.Driver
host: ------
port: 3306
database: -----
username: ----
password: ----

BungeeCord premium skins (ChangeSkin)

Hello, I'm using BungeeCord and ChangeSkin. When I do /premium, my skin do not appear anymore :/
And it do the same when I set forwardSkin to false.

Thank you :)

Command to change Premium to Nopremium

I think Admins should have a command to remove the premium status for accounts that by mistake were changed to premium, because doing it manually in the databse needs a server restart.

edit:
nvm Its there, just needs to be completed.

Fatal Error:Connection Terminated

Hi.

I have a Custom ModPack server called Post Blast from Technic Platform.
We use Authme, and your plugin Fastlogin to allow new premium players less hassle.
However cracked players with premium nicks cant login because they get invalid sessions:
I reconfigured the configuration file and now they get fatal error: connection terminated.

Console says nothing now, but before it said: could not pass player joinevent and disconnected them

Now it looks like a client disconnect.

#
# nameChangeCheck = false ----- autoRegister = false
#
# We will always request a premium authentication if the username is unknown to us, but is in use by a paid minecraft
# account. This means it's kind of a more aggressive check like nameChangeCheck = true and autoRegister = false, because
# it request a premium authentication which are completely new to us, that even the premium UUID is not in our database.
#
# **Limitation**: see below
#
# #### Case 4
#
# nameChangeCheck = true ----- autoRegister = false
#
# Based on autoRegister it checks if the player name is premium and login using a premium authentication. After that
# fastlogin receives the premium UUID and can update the database record.
#
# **Limitation from autoRegister**: New offline players who uses the username of an existing minecraft cannot join the
# server.
nameChangeCheck: false

# If your players have a premium account and a skin associated to their account, this plugin
# can download the data and set it to the online player.
#
# Keep in mind that this will only works if the player:
# * is the owner of the premium account
# * the serverconnection is established through a premium connection (paid account authentification)
# * has a skin
#
# This means this plugin doesn't need to create a new connection to the Mojang servers, because
# the skin data is included in the Auth-Verification-Response sent by Mojang. If you want to use for other
# players like cracked player, you have to use other plugins.
#
# If you want to use skins for your cracked player, you need an additional plugin like
# ChangeSkin, SkinRestoer, ...
forwardSkin: false

# Displays a warning message that this message SHOULD only be invoked by
# users who actually are the owner of this account. So not by cracked players
#
# If they still want to invoke the command, they have to invoke /premium again
premium-warning: true

# Database configuration
# Recommened is the use of MariaDB (a better version of MySQL)

# Single file SQLite database
driver: org.sqlite.JDBC
# File location
database: '{pluginDir}/FastLogin.db'

# MySQL
#driver: com.mysql.jdbc.Driver
#host: localhost
#port: 3306
#database: fastlogin
#username: myUser
#password: myPassword

Please help!
Losing new players by the hour!
many thanks :)

Strange error :D

I translated this to my language but i cant compile/package it.
[ERROR] Failed to execute goal on project fastlogin.bukkit: Could not resolve dependencies for project com.github.games647:fastlogin.bukkit:jar:0.5: Failed to collect dependencies for [org.spigotmc:spigot-api:jar:1.8.8-R0.1-SNAPSHOT (provided), com.comphenix.protocol:ProtocolLib:jar:3.6.5-SNAPSHOT (compile?), protcolsupport:ProtocolSupport:jar:Build-337 (system), fr.xephi:authme:jar:5.2-SNAPSHOT (compile?), com.github.lenis0012:LoginSecurity-2:jar:-9c09e73b7f-1 (compile), com.github.RoyalDev:RoyalAuth:jar:-e21354a9b7-1 (compile), de.luricos.bukkit:xAuth:jar:2.6 (compile?), de.st_ddt.crazy:CrazyCore:jar:10.7.7 (system?), de.st_ddt.crazy:CrazyLogin:jar:7.23 (system?)]: Failed to read artifact descriptor for ru.tehkode:PermissionsEx:jar:1.22.7: Could not transfer artifact ru.tehkode:PermissionsEx:pom:1.22.7 from/to pex-repo (http://pex-repo.aoeu.xyz/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

I tried to add protocollib but nothing happen.

MySQL UUID is NULL

Hello, first of all I'm sorry for my English. It's not my native language and sorry If this is not the right place where I can ask for help and I'm newbie on GitHub and barely know about this place.

For my sever I allowed cracked and premium id can join my server but I didn't allowed cracked user with premium name account to join at the first place and I have AutoIn handle auto-lgoin and fixed premium uuid for premium account.

I'm switching from AutoIn and trying to understand how does FastLogin work. And I have a few questions, It would be appreciated if you would kindly help, correct and suggest me.

  • MySQL issues, that UUID column is NULL, as you can see, I logged in with 2 cracked accounts (non-premium account, UserID 1 and 2) and the plugin stored the data in MySQL table except UUID column. So, Is this normal?
    I tried to re-logged a few time and still got the same result.
    screen shot 2559-07-09 at 1 51 29
  • Then this picture, as you can see I tested by login with exiting premium account with premium luncher (UserID 3), the plugin won't generate the data in MySQL for the first time, I have to invoke /premium command then the data will be generated. This is how the plugin work right? I trying to re-logged but also still got NULL UUID for this premium account too.
    screen shot 2559-07-09 at 1 53 03
  • Another question, Is there any way to prevent cracked users invoke /premium command. For that cracked users who invoke /premium command, they will not be able to join the server, that's weird and Admin/me need to change the value back to 0 in Premium column in MySQL for those players one by one.

Thanks.

Here is my FastLogin config (bungeecord)
http://pastebin.com/XGcFcbbM

KCauldron

Can you please try to rewrite it agaist newest KCauldron? There are several things that are missing at KCauldron, so it doesn't work.

Config error?

Hello everyone, i have a problem, probably a my error, but i'm not sure,
when i join (i'm premium!) it gives me an error:
'Please add the server in your server list! Please make sure the Server MOTD shows up before trying to login again!'
The MOTD shows up, and the error too, any solution?
If you need my config.. feel free to ask

Bukkit detected as bungee, no premium detection, no databases.

[18:10:36] [Server thread/INFO]: [FastLogin] Hooking into auth plugin: AuthMe
[18:10:36] [Server thread/INFO]: [FastLogin] BungeeCord setting detected. No auth plugin is required

I just tried your last build on a clean server:

Spigot 1.9.4 + AuthMe 3.4

No premium detection
No databases created mysql or sqlite (tried both)
Required to register as Premium

Autologin without command + config option for it

Hello,

I am having issues with the auto login for AuthMe-5.2 build #699. I am using the latest (protocolsupport compatible) version of your plugin.

Your plugin correctly detects the AuthMe plugin and puts verbose of a succesful hook. The player however, is not correctly logged in and has to type in the password. I am using latest ProtocolSupport and ProtocolLib.

Please let me know if you will need logs for debug. Thanks.

Premium join as nopremium if tries to login while server is Starting

I Think fastlogin is one of the latest plugins to load, when a players joins the server while this is loading, he gets to the "queue" while server finish loading but during this time fastlogin doesnt acts and the server assigns a offline uuid to the player, when server finishes loading you login as a offline player and arent autologged in.

Best solution for this is locking the server while it is loading and when fastlogin finishes loading remove the lock. People can wait while the server is loading, no need to hurry.

No premium skin

Running in bukkit (no bungee)
Config:

# FastLogin config
# Project site: https://www.spigotmc.org/resources/fastlogin.14153
# Source code: https://github.com/games647/FastLogin
#
# You can access the newest config here:
# https://github.com/games647/FastLogin/blob/master/core/src/main/resources/config.yml

# Request a premium login without forcing the player to type a command
#
# If you activate autoRegister, this plugin will check/do these points on login:
#1. An existing cracked account shouldn't exist
# -> paid accounts cannot steal the existing account of cracked players
# - (Already registered players could still use the /premium command to activate premium checks)
#2. Automatically registers an account with a strong random generated password
# -> cracked player cannot register an account for the premium player and so cannot the steal the account
#
# Furthermore the premium player check have to be made based on the player name
# This means if a cracked player connects to the server and we request a paid account login from this player
# the player just disconnect and sees the message: 'bad login' or 'invalid session'
# There is no way to change this message
# For more information: https://github.com/games647/FastLogin#why-do-players-have-to-invoke-a-command
autoRegister: true

# If this plugin detected that a player has a premium, it can also set the associated
# uuid from that account. So if the players changes their usernames, they will still have
# the same playerdata (inventory, permissions, ...)
#
# Warning: This also means that the UUID will be different if the player is connecting
# through a offline mode connection. This **could** cause plugin compatibility issues.
#
# This is a example and doesn't apply for every plugin.
# Example: If you want to ban players who aren't online at the moment, the ban plugin will look
# after a offline uuid associated to the player, because the server is in offline mode. Then the premium
# players could still join the server, because they have different UUID.
#
# Moreover you may want to convert the offline UUID to a premium UUID. This will ensure that the player
# will have the same inventory, permissions, ... if they switched to premium authentification from offline/cracked
# authentification.
#
# This feature requires Cauldron, Spigot or a fork of Spigot (PaperSpigot, TacoSpigot)
premiumUuid: true

# This will make an additional check (only for player names which are not in the database) against the mojang servers
# in order to get the premium UUID. If that premium UUID is in the database, we can assume on sucessful login that the
# player changed it's  username and we just update the name in the database.
# Examples:
# #### Case 1
# nameChangeCheck = false ----- autoRegister = false
#
# Player logins as cracked until the player invoked the command /premium. Then we could override the existing database
# record.
#
# #### Case 2
#
# nameChangeCheck = true ----- autoRegister = false
#
# Connect the Mojang API and check what UUID the player has (UUID exists => Paid Minecraft account). If that UUID is in
# the database it's an **existing player** and FastLogin can **assume** the player is premium and changed the username.
# If it's not in the database, it's a new player and **could be a cracked player**. So we just use a offline mode
# authentication for this player.
#
# **Limitation**: Cracked players who uses the new username of a paid account cannot join the server if the database
# contains the old name. (Example: The owner of the paid account no longer plays on the server, but changed the username
# in the meanwhile).
#
# #### Case 3
#
# nameChangeCheck = false ----- autoRegister = true
#
# We will always request a premium authentication if the username is unknown to us, but is in use by a paid minecraft
# account. This means it's kind of a more aggressive check like nameChangeCheck = true and autoRegister = false, because
# it request a premium authentication which are completely new to us, that even the premium UUID is not in our database.
#
# **Limitation**: see below
#
# #### Case 4
#
# nameChangeCheck = true ----- autoRegister = true
#
# Based on autoRegister it checks if the player name is premium and login using a premium authentication. After that
# fastlogin receives the premium UUID and can update the database record.
#
# **Limitation from autoRegister**: New offline players who uses the username of an existing minecraft cannot join the
# server.
nameChangeCheck: true

# If your players have a premium account and a skin associated to their account, this plugin
# can download the data and set it to the online player.
#
# Keep in mind that this will only works if the player:
# * is the owner of the premium account
# * the serverconnection is established through a premium connection (paid account authentification)
# * has a skin
#
# This means this plugin doesn't need to create a new connection to the Mojang servers, because
# the skin data is included in the Auth-Verification-Response sent by Mojang. If you want to use for other
# players like cracked player, you have to use other plugins.
#
# If you want to use skins for your cracked player, you need an additional plugin like
# ChangeSkin, SkinRestoer, ...
forwardSkin: true

# Displays a warning message that this message SHOULD only be invoked by
# users who actually are the owner of this account. So not by cracked players
#
# If they still want to invoke the command, they have to invoke /premium again
premium-warning: true

# If you have autoRegister or nameChangeCheck enabled, you could be rate-limited by Mojang.
# The requests of the both options will be only made by FastLogin if the username is unknown to the server
# You are allowed to make 600 requests per 10-minutes (60 per minute)
# If you own a big server this value could be too low
# Once the limit is reached, new players are always logged in as cracked until the rate-limit is expired.
# (to the next ten minutes)
#
# The limit is IP-wide. If you have multiple IPv4-Addreses you specify them here. FastLogin will then use it in rotating
# order --> 5 different IP-addreses 5 * 600 per 10 minutes
# If this list is empty only the default one will be used
#
# Lists are created like this:
#ip-addresses:
#    - 192-168-0-2
ip-addresses: []

# How many requests should be established until the plugin uses the third-party API https://mcapi.ca/
# Once this number is reached in a range of ten minutes it will start connecting to https://mcapi.ca/ for the next ten minutes
# This option exists in order to workaround the rate-limiting. Name -> UUID are fetched in the same way like heads
#
# If you want to join the discussion visit this: https://github.com/games647/FastLogin/issues/27#issuecomment-226954350
mojang-request-limit: 600

# Database configuration
# Recommened is the use of MariaDB (a better version of MySQL)

# Single file SQLite database
driver: org.sqlite.JDBC
# File location
database: '{pluginDir}/FastLogin.db'

# MySQL
#driver: com.mysql.jdbc.Driver
#host: localhost
#port: 3306
#database: fastlogin
#username: myUser
#password: myPassword

Server Is Online Mode

// I know I'm creating a lot of issues, but, IDK wtf is happening

in the server.proprieties online mode is false, but....
image

Premium UUID

Add a configuration option to use a premium UUIDs if the player logged in as a premium player.

Offline Premium Player uuid Detection

Basically there are plugins like OpenInv which let me check players inventory when they are offline... because the server is offline mode, we cannot use this kind of feature for offline premium players because I believe the plugin will try to find a player with a cracked uuid unless he is online. Is there a way to do fix it with fastlogin ?

other plugin that has this issue is QuickShop

Logins online UUID broken

When i login with my bungeecord in offline mode. If its a premium user fastlogin doesn't detect.

using bungeeAuth as cracked login.

AutoRegister support for cracked with premium names.

In my server setup, I am basically trying to hide the fact that I accept Cracked players, therefore premium players need to be auto-registered, but in this plugin to achieve that I need to also reject cracked players with the name of a premium player. Many of the cracked players on my server use premium names, and therefore I cannot use that mode, which creates a conflict.

The other option would be to disable auto-registration. That mode is perfect for the cracked players, but the premium players automatically join as a cracked player which causes issues, since my players don't like to enter the commands they are told to by the server, so countless premium players will play with the incorrect UUID until we tell them to do /premium, which is a horror I do not want to happen. It will also make it very obvious that we are a premium server, which makes some players think negatively of my server.

The solution is not perfect, but it should work pretty well, so I think it should be a config option.
Here it is: after failing the premium encryption request (So PreLoginEvent without a LoginEvent following it after the 5 second timeout), it records their username as failed auth check (Maybe a 3 in the database). Next time they join it will allow them to join in offline mode. The third time they join it will do a second online mode check again, and if they fail a second time it will log them as cracked. The second check will be after a delay (maybe a day) to prevent it from falsely assuming they are cracked after the first encryption request failed because their first time joining they may have had an expired session.

To prevent further false assumptions, also check if the session and/or auth servers are online in case they started Minecraft in offline mode (which would create a false session) or if it failed because the mojang servers are down and not because they were in offline mode.

The way I just described will be a lot better than the current setup I use (Which is terrible because the dev didn't know how to register an intent and instead used a blocking operation which causes pauses to players) and because of all of the checks and logging I am describing. My current plugin doesn't log anything but the names that are premium. I was actually planning on making a plugin if I had time but after I saw this I decided someone already did the work. If you cannot implement this feature I guess I will just edit the one I have (Which I was able to decompile because it broke when Mojang's website changed) and fix the blocking operation, but your plugin is significantly better.

Thanks for reading this, let me know if anything doesn't make sense.

Localistaion files

Hello,

adding localisation files will be nice step, 'cause people can help you translate your plugin into multiple languages in easy way - ae. I can translate to Czech.

Don't work

i have a bungee server, and i use loginsecurity, but all the time i have to write /login mypassword
i use mysql in both of them

Premium players are'nt premium (Bungee)

Hello,

I'm using the latest version from Spigot and I have enabled; AutoLogin, PremiumUUID and NameCheck. But a premium player is still set as a cracked player. (No UUID in the DB and Premium is set to 0). I'm using BungeeCord.

So I have been looking for the reason and i found this commit;
a634876

After reverting this commit in my fork everything started working again. So I think there is a mistake in there.

~
Tim

Random Auto-LogIn for Premium

Sometime premium player need to login via Authme last version.
The problem is, the player dont know the password, because auto-register (gen random password).
I can solve the problem manually with the command /premium name.
And the player losing ranks / skins / stuff.
Im using the lastest version and I have no error codes.

Premium players sometimes do not register..

Hello,

I'm using FastLogin with bungeecord and it seems that some players have to use /login in the lobby and they aren't set in the FastLogin database. The solution for me is simple; Unregister the player with authme so FastLogin will see the player as "new" or by adding him/her manual to the database with premium state.

Is there a possibility to check if the user is in the FastLogin database instead of the AuthPlugin database? Because I have seen ~5 players that didn't exist in the FastLogin database but they did exist in the AuthMe database. So they still need to use /login password and the didn't have a skin.

AutoIn -> FastLogin

I really don't have time to develop my autoin plugin, and small part community is already so annoying for me (that kind of people who think that because I made this plugin I must be 24/7 on spigot and skype to help them set that database option to mysql instead of sqlite on bungee) that I started thinking about dropping support for autoin, but I don't want just remove project and leave everyone with nothing, so I have some questions:

  1. Are you able to handle that? Probably many users may start writing to you, autoin have near 40k downloads.
  2. What configurations are you (your plugin) able to handle? AutoIn is hard to config, but it can support even more weird setups, like multi-bungee environment, where player can enter to some severs via multiple bungees and different paths, like: masterBungee -> BungeeA -> serverA -> player and masterBungee -> BungeeB -> serverA -> player. Or one player join directly to server, and other use bungee. Very few, but still, users were using this. I have no idea why, but whatever. This isn't important.
  3. Do you fix uuids too? (many people use autoin because of that) And is there any option to disable that?
  4. Do you have option to create whitelist only for cracked players? (many people use autoin because of that)
  5. Do you have optional option to protect cracked accounts after first join? So even if someone will buy their nick they still need to /login.
  6. Do you have option to allow change account state from cracked to premium? Like cracked premium buy own account on Mojang and now want to be auto-logged, so he enter to the game, login to server and invoke some command and rejoin to confirm account.
  7. Ability to enable /login for selected accounts, some server owners still want to use /login as this works near like 2-factor auth. (Mojang + AuthMe)
  8. Allowing only already registered cracked players to play? So new premium players can join, but no new cracked players, aka "switch mode", also many people used that.
  9. Blocking invoking commands from bungee when not logged in? (it's broken in autoin anyway :D)
  10. "Forced Servers", so premium players will always go to other server than cracked ones. (It's good idea to support forced hosts and version detection too)
  11. Do you need any help with that (but still remember that I don't have much free time now)?

Some of that options may require using plugin on bungee side too, idk how your plugin works now.

Also you should think about implementing (only my private unfinished autoin had this):

  • Multiple IP address support to skip mojang api limits.
  • Proxy support for this same reason.
  • Some kind of anti-bot system, detection of premium, even on async stuff on packet detection can really cause big problems when someone will bot your server, especially that this may send too many request to mojang and you will hit request limit.

Premium name change

On my bungee server some players are always shown as connected even if they are not. So if the player tries to reconnect he gets kicked because he is already connected, it happens randomly to players, both premium and cracked.
The /glist returns player name like if he was connected, it causes bugs with other bungee plugins, for example /msg spams with errors.
I hope you understand ^^, random players are considered connected by bungee (only bungee), they can't connect and it causes issues with other plugins.

Another issue: if a premium player joins the server after changing his name he has to login but I have enabled autoRegister and players don't know their password.

Java version: 1.8.0_101 (Java HotSpot(TM) 64-Bit Server VM)
Bungee version: git:Waterfall-Bootstrap:1.10-SNAPSHOT:8627c86:unknown (MC: 1.8.x, 1.9.x, 1.10.x)
FastLogin version: 1.7.1

Config file (same for both bungee and spigot): http://pastebin.com/yJtZUm8D

Support for multiple / remote BungeeCord instances.

Hi, can you make this plugin supports for multiple remote BungeeCord?

I have tried to add multiple lines of stats-id on the spigot side proxy-whitelist.txt, yet it seems that only the one on the first line can auto-logged premium players.

The first bungee I have is located on the same machine as spigot (so call localhost). The second and third are located on the different machines. All BungeeCords sharing the same MySQL database of FastLogin. Between spigots and remote bungee there is a firewall allows only spigot traffic to go through. Unfortunately this firewall is not what I can control.

I haven't tested it harder so it might be the problem with multiple BungeeCord supports, OR it could be the problem with the firewall (assuming FastLogin uses some extra protocol like AutoIn did). I will try it on my PC later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.