@EventHandler
publicvoid onRequest
(ModRequestEvent event
){ // PLAYER REQUEST! Player user
= event.
getUser();
// PLAYER CODE REQUEST! String code
= event.
getCode();
// THE PLAYER RETRIEVED FROM THE CONFIG BY THE CODE! CHECK IT, BECAUSE IT CAN RETURN NULL IF THE PLAYER IS NOT ONLINE OR NOT IN THE CONFIG! Player confUser
= event.
getUserConf(); if(confUser
!=null){
}
// THE USERNAME RETRIEVED FROM THE CONFIG BY THE CODE! CHECK IT, BECAUSE IT CAN RETURN NULL IF IT'S NOT IN THE CONFIG! String confUsername
= event.
getUsernameConf(); if(confUsername
!=null){
}
// THE UUID RETRIEVED FROM THE CONFIG BY THE CODE! CHECK IT, BECAUSE IT CAN RETURN NULL IF IT'S NOT IN THE CONFIG! UUID confUuid
= event.
getUuidConf(); if(confUuid
!=null){
}
// WITH THIS, YOU CAN DISABLE THE CONTINUATION OF THE EVENT AND INTERRUPT CERTAIN CHECKS OF ADMINSECURITY IF NECESSARY! if(!event.
isCancelled()){ event.
setCancelled(true); } }
@EventHandler
publicvoid onDetected
(ModDetectedEvent event
){ // PLAYER REQUEST! Player user
= event.
getUser();
// WITH THIS, YOU CAN CHECK IF THE PLAYER IS USING A MOD, BUT IT MAY RETURN A FALSE VALUE IF THE CLIENT DIDN'T RESPOND IN TIME! boolean detected
= event.
isDetectedMod(); if(detected
){
}
// WITH THIS, YOU CAN DISABLE THE CONTINUATION OF THE EVENT AND INTERRUPT CERTAIN CHECKS OF ADMINSECURITY IF NECESSARY! if(!event.
isCancelled()){ event.
setCancelled(true); } } }
Blacklist-help: '&b/adminsecurity blacklist <code> &8- &fAdd code to the blacklist!'
Unblacklist-help: '&b/adminsecurity unblacklist <code> &8- &fRemoved code from the blacklist!'
Invalid-code-format: '&cError! &cInvalid code format!'
This-code-does-not-exist: '&cError! &cThis code does not exist!'
This-code-is-not-blacklisted: '&cError! &cThis code is not blacklisted!'
This-code-is-blacklisted: '&cError! &cThis code is blacklisted!'
You-entered-the-command-incorrectly: '&cError! &cYou entered the command incorrectly!'
The-code-has-been-added-to-the-blacklist: '&8[&cAS&8] &8» §aThe code &2%code% &ahas been added to the blacklist!'
The-code-has-been-removed-from-the-blacklist: '&8[&cAS&8] &8» §aThe code &2%code% &ahas been removed from the blacklist!'
Same-username-is-on-the-server: '&bSame username is on the server: &3%username%'
Same-UUID-is-on-the-server: '&bSame UUID is on the server: &3%uuid%'
Name-case-conflict-detected: '&bName case conflict detected: &3%username%'
Authentication-failed: '&bAuthentication failed!'
UUID-cannot-be-null: '&bUUID cannot be null!'
UUID-authentication-failed: '&bUUID authentication failed!'
Someone-else-has-connected-with-this-code: '&bSomeone else has connected with this code!'
You-have-sent-data-to-the-server-too-often: '&bYou have sent data to the server too often!'
The-UUID-is-blacklisted: '&bThe UUID is blacklisted!'
CHECK-ONLINE:
USERNAME: true # CHECKS IF THE USERNAME IS ALREADY IN USE ON THE SERVER!
UUID: true # CHECKS IF THE UUID IS ALREADY IN USE ON THE SERVER!
NAME-CASE: true # CHECKS FOR CASE SENSITIVITY IN THE NAME!
MOD-CHECKER:
ONLY-MOD: false # ONLY PLAYERS USING THE MOD CAN JOIN THE SERVER!
TIME: 3 # DATA ARRIVAL COUNTED FROM PLAYERJOINEVENT!
SEND-LIMITER:
SEND-LIMIT: 3 # MAXIMUM NUMBER OF CODE SENDS PER MOD!
BLOCK-TIME: 10 # HOW MANY SECONDS THE MOD CANNOT SEND DATA!
AUTO-LOGIN:
AUTH-ME: false # AUTH ME PLUGIN AUTOMATICALLY LOGS YOU IN IF YOU USE A MOD!
NLOGIN: false # NLOGIN PLUGIN AUTOMATICALLY LOGS YOU IN IF YOU USE A MOD!
Custom-kick: |-
&r &r
&8【&c✽&8】 &eYou have been kicked from the server! &8【&c✽&8】
&r &r
&b%reason%
&r &r
&7Join our discord if there's an issue!
&7&o(https://discord.io/chroncode/)
&r &r