You can also use the api for the proxy the plugin does not have to be in the plugins folder but in the project.
Code (Java):
@Override
public
void onEnable
(
)
{
BitsAPI.
getInstance
(
).
connect
(
3,
new Profile
(
"127.0.0.1",
3306,
"root",
"byncing",
null
)
)
;
}
@Override
public
void onDisable
(
)
{
BitsAPI.
getInstance
(
).
disconnect
(
)
;
}
The player is registered in the database because it does not exist, but the spigot does it automatically!
Code (Java):
@EventHandler
public
void handle
(PostLoginEvent event
)
{
ProxiedPlayer player
= event.
getPlayer
(
)
;
BitsAPI instance
= BitsAPI.
getInstance
(
)
;
if
(
!instance.
existsUser
(player.
getUniqueId
(
)
)
)
{
instance.
addUser
(player.
getUniqueId
(
), player.
getName
(
)
)
;
}
}