ZAuth is a simple authorization plugin . PLUGIN 1.0.5 VERSION IS UPDATED TO CB 1.3.2-R3.0 ! PLUGIN 1.1.0 VERSION IS UPDATED TO CB 1.4.2-R0.2 ! I'M SEARCHING BETA TESTERS FOR MY PLUGINS . IF SOMEONE IS INTERESTED PLEASE SEND ME A PM ON BUKKITDEV OR ON THE BUKKIT FORUMS . Need help or download? CLICK ON THIS LINK ! Tutorial - Will be released soon . Supported Languages [this plugin supports all the languages because you can personalize the server messages XD] -ITALIANO (La mia lingua madre) -ENGLISH ( en/us ) Features - Prompts users to register and login to your server - not logged in and not registered users are freezed and can not build or destroy - not logged in users can not interact with wooden doors , iron doors , trap doors , chests(normal & ender) , buttons , levers , beds , furnaces , workbenches , fence gates and jukeboxes . - Users can send pms to each others - MD5 password encryption - Italian language support (I'm italian so I also added it XD) [DELETED IN 1.1.0] - Names restrictions (only a-z , A-Z , 0-9 characters will be permitted - with config obviously) [NEW IN 1.1.0] - Personalized server messages [NEW IN 1.1.0] - Ability to control OPs [NEW IN 1.1.0] - NO DATABASES ! Commands - /register 'password' 'password again' (without quotes) . Permits the player to register to the server . - /login 'password' (without quotes) . Permits the player to login to the server. - /to 'player' 'message' (without quotes) . Sends a pm to the requested player if he's online . - /op 'player' 'true/false' (without quotes) . Permits an op to make a player to be OP . [NEW IN 1.1.0] Future Features - Permissions support (maybe with vault - for group support) - Griefers punisher (acts like a prison , with a command admins can freeze the player that is griefing) - Ability to change your own password Permissions Those are fake permissions because the plugin has no external permission control . On future releases I'll change that to implement the real permissions . ZAuth.* Grants access to all of the commands for this plugin. (DEFAULT: ONLY OPs) ZAuth.register Allows the player to register to the server. (DEFAULT: ON - IF NOT LOGGED IN) ZAuth.login Allows the player to log into the server. (DEFAULT: ON - IF REGISTERED) ZAuth.build Allows the player to build. (DEFAULT: ON - IF LOGGED IN) ZAuth.destroy Allows the player to destroy. (DEFAULT: ON - IF LOGGED IN) ZAuth.to Allows the player to send a pm to another player. (DEFAULT: ON - IF LOGGED IN) Changelog 1.1.0 (13 november 2012) Fixed : - CB BETA 1.4.2-R0.2 compatibility issue Added : - Configurable (set on or off) name check on login (if it is activated and the name of the player contains unallowed characters it will be kicked from the server) [as asked by users XD] - Customizable server messages via the file messages.yml - OPs control (new /op command to set new players op or not) 1.0.5 (24 september 2012) Fixed : - Configuration error (plugin is now working , I'm sorry for the mistake ç_ç) 1.0.4 (24 september 2012) Fixed : - languages support (italian strings in the en/us file & english strings in the italian file) - login command is no more permitted after being logged in 1.0.3 (23 september 2012) Fixed : - languages support Added : - unability for non-logged in users to interact with chests,furnaces,wooden doors,etc.... 1.0.2 (21 september 2012) Fixed : - EN/US language error Added : - Italian language support 1.0.1 (21 september 2012) Added : - md5 password encryption 1.0.0 (20 september 2012) - First release Known issues: - none Source code Can be found on github : here
For the permissions you can simply use the if (player.hasPermission("permission.node")) {. Great work btw
Just one thing to mention: Code: public void onPlayerMove(PlayerMoveEvent evt) { Player s = evt.getPlayer(); String user=s.getDisplayName(); if(!za.getConfig().getBoolean(user+".loggedin")){ evt.setTo(evt.getFrom()); if(evt.getFrom().getX() != evt.getTo().getX() || evt.getFrom().getY() != evt.getTo().getY() || evt.getFrom().getZ() != evt.getTo().getZ()) { Location loc = evt.getFrom(); loc.setPitch(evt.getTo().getPitch()); loc.setYaw(evt.getTo().getYaw()); evt.getPlayer().teleport(loc); } } Why can't you just use setCancelled(true); ?
For the permissions was mine decision because I'm studying on hooking into vault for it without using the normal bukkit permissions XD For the event I saw that in the CB build 2360 (1.3.2-R0.2) I'm using for building my plugin if you simply set it cancelled the player can still look around ^^ I'm using build 2360(CB 1.3.2-R0.2) because it's fully compatible with the beta build for CB 1.3.2-R0.1 and even with the CB recommended build for 1.3.1-R2.0 ! so if someone is not using development builds this plugin will not have problems ^^ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I was using getDisplayName() instead of getName() for the usernames , I apologize for this error .... If someone wants I can make a plugin to fix the config folder without deleting it ....
It is not so different , but it is simpler (and faster because it uses less server resources so it causes less lag XD) and integrates the private messages between users
Why would you hook into vault to avoid using bukkit permissions? Permissions plugins register the permissions with Bukkit, so there's literally no reason to use vault.
Oh really ? ;P I thought it was different XD that is my first plugin and I'm still learning the bukkit programming style ^^
RELEASED DEV BUILD 439 (future update 1.1.0) ! You can find it on bukkitdev : http://dev.bukkit.org/server-mods/z_auth/pages/dev-versions/
The plugin is updated but moderators said that offline auth plugins are no more permitted to stay on bukkitdev but they deleted only my projects and not the other ones ! I don't want they delete also xauth or vauth or other plugins like this but I want to know the real reson why they deleted mine ! It was only beacause I don't want to pay you for staying on a free service for developers as bukkitdev ? I'll never pay for a free service ! NEVER ! I'll post my plugin downloads here ^^ If someone will delete this page here is my website plugin page : http://zednetcorp.altervista.org/bukkit/ XD Site is under development so don't be afraid if you don't see the plugin online right now ^^ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Just a suggestion: (code form the nr.1 auth plugin) Code: @EventHandler(priority=EventPriority.HIGHEST) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent command){ Player player = command.getPlayer(); String user= player.getName(); if(plugin.getConfig().getBoolean(user+".loggedin")){ if(!command.getMessage().startsWith("/login") && !command.getMessage().startsWith("/register")) { command.setCancelled(true); } } } It gives a knockback wich is again tracked as a movement wich can be really anoying. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
The correct code should be : Code: @EventHandler(priority=EventPriority.HIGHEST) public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent command){ Player player = command.getPlayer(); String user= player.getName(); if(plugin.getConfig().getBoolean(user+".loggedin")==false){ if(!command.getMessage().startsWith("/login") && !command.getMessage().startsWith("/register")) { command.setCancelled(true); } } } because it must work only if the player is not logged in , right ? I'll put the not logged in user's movement ability as a config in the new release ^^ Thank you for the suggests !
Are you using my plugin lenis ? I saw you made one don't you ? I'm going to send you the italian Language.yml for your plugin XD
Ciao, non mi parte il plugin. Io metto il jar nella cartella plugin (il plugin è la versione 1.1.0, quella per la 1.4.5 ed il mio server è alla 1.4.5), ma quando lo starto non si crea nessuna cartella, bukkit neanche lo considera e nel log del server non è presente alcun riferimento al plugin. Sai come potrei metterlo a posto??
Nice plugin idea this can be really useful but also may be blamed by some ... "hard" effort to register haha.