[INACTIVE] [ADMN] KiwiAdmin 2.2 - ban/tempban/kick/ipban, (MySQL or txt) [670-1158]

Discussion in 'Inactive/Unsupported Plugins' started by yottabyte, Jan 23, 2011.

  1. Offline

    yottabyte

    This plugin is no longer being updated for the public. The source is still being updated though, grab that and use it if you want to. Note that you might need to change some hard coded database names and such. (Advanced users only, basically)
    https://github.com/yottabyte/KiwiAdmin

    If you wish to continue the plugin in some form, please contact me first.

    things (open)

    KiwiAdmin 2.2
    Built against Craftbukkit #1000


    Hello people, I'm releasing my first public plugin!
    This is a very simple plugin, it adds the banning and kicking stuff for more people than just ops!

    KiwiAdmin requires either the Permissions or the GroupManager plugin!

    Features
    • Banning
    • Kicking
    • Unbanning
    • IP bans
    • Reloading banlist from either flatfile or database
    • MySQL support!
    • All actions are broadcasted to the people!
    • Case insensitivity!
    • Partial names support
    • 100% custom messages with colors
    • Temporary bans
    • Stores kicker, time, reason etc.
    • PHP script for a public banlist table. Example
    Partial names for /kick, /tempban, /ipban and /ban is optional although it is highly recommended as it seems like Bukkit has a built in feature where it can recognize a player just from the first part of their name. Eg. you ban player with "/ban playe", the ban will then be stored as playe and player will still be able to log in.


    In permissions, add these:

    Code:
    kiwiadmin.ban - Ban players
    kiwiadmin.kick - Kick players
    kiwiadmin.kick.all - Kick all players
    kiwiadmin.unban - Unban a player
    kiwiadmin.reload - Reload from the database
    kiwiadmin.tempban - Temporarily ban a player
    kiwiadmin.ipban - IP ban a player
    kiwiadmin.export - Export banlist
    
    Commands are simple:
    Code:
    /ban [player] (reason) - Ban a player, the reason will be in the kick message.
    /kick [player] (reason) - Kick a player, the reason will be in the kick message.
    /kick * (reason) - Kick all players on the server
    /tempban [player] [time] [sec/min/hour/day/week/month] (reason)
    /unban [player] - Unban a player
    /ipban [player] (reason)
    /reloadka - Reload KiwiAdmin from banlist.txt
    /checkban [player] - check if a player is banned
    /exportbans - export all bans to banned-players.txt
    
    If using flatfile, bans are stored in /plugins/KiwiAdmin/banlist.txt.
    IP bans are stored in plugins/KiwiAdmin/iplist.txt

    If you are using MySQL, run this query:
    Code:
    CREATE TABLE  `banlist` (
      `name` varchar(32) NOT NULL,
      `reason` text NOT NULL,
      `admin` varchar(32) NOT NULL,
      `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `temptime` TIMESTAMP NOT NULL ,
      PRIMARY KEY (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    CREATE TABLE  `banlistip` (
      `name` varchar(32) NOT NULL,
      `ip` varchar(15) NOT NULL,
      PRIMARY KEY (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    You will also need the Connector/J in your root bukkit folder just like all other MySQL plugins!

    Using the php viewer
    You can download the php file here.
    Open it in any notepad style program and change the database settings. Save and upload to website!

    Updating from 1.x
    If you have a database from KiwiAdmin 1.x you have to run
    Code:
    ALTER TABLE  `banlist` ADD  `temptime` TIMESTAMP NOT NULL ;
    Updating database from 2.0 to 2.1
    2.1 introduces IP bans, you have to create this table to use them
    Code:
    CREATE TABLE  `minecraft`.`banlistip` (
      `name` varchar(32) NOT NULL,
      `ip` varchar(15) NOT NULL,
      PRIMARY KEY (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    [​IMG] Download
    Source (not updated too often)

    Update 2.2
    • Fixed /kick *
    • Added /exportbans
    Changelog (open)


    Update 2.1
    • Added IP bans
    Update 2.0

    • Almost completely rewrote the entire plugin
    • Added temporary bans, full flatfile support
    • New configuration file
    • Added customizable messages!
    • Now displays ban reason when player tries to log in
    Update 1.2

    • Added partial names support for kicking and banning.
    • Fixed the kicking message when banning showing "Reason:" although there were no reason. (Only for MySQL users)
    Update 1.1

    • Reverted back to normal commands, /ban, /kick and /unban
    • More case insensitivity improvements. The banlists are no longer lower case only.
    • Fixed the ugly blank lines in the txt file if using flatfile
    Update 1.0


    • MySQL support!
    • Cleaned up A LOT of code.
    Update 0.5


    • Removed TSLPC
    • Added console commands support. These will be displayed as "server" eg. "yottabyte has been kicked by server!"
    Update 0.4


    • Updated to work with version 183+
    • Reformatted the commands to avoid interfering with the vanilla commands.
    Version 0.3


    • Added /unban
    • Added /reloadka - reloads the banlist from banlist.txt
    Version 0.2


    • When a player is kicked or banned, a global message is sent. Includes reason if there is one.
    • Changed PLAYER_JOIN to PLAYER_LOGIN, banned players are now kicked before they enter the server.

     
    losdamianos, malex, zcleaver and 3 others like this.
  2. Offline

    PyPKjE

    I do not understand why I drop a mistake?
    An internal error occurred while attempting to perform this command
     
  3. Offline

    cheepz

    @yottabyte

    Sorry if you misunderstood, but what I mean is.

    Lets say I am tempbanned, and my time is not yet up.
    When I try to join the server, I get a time format in a timezone that people are unfamiliar with.

    Could you set it up so it follows this format instead? (Not necessarily this format, but if you can understand what I'm trying to say..)

    Month: 0 Week: 0 Day: 0 Hour: 12 Min: 53 Sec: 30
    Reason: <insert here>

    or

    Month: 0 Week: 0 Day: 0 Hour: 12 Min: 53 Sec: 30 Reason: <insert here>

    So it will constantly update as the temp banned person tries to enter the server?
     
  4. Offline

    thestriker095

    there seems to be an error/issue with the "kick *" command!
    when i use it in the console i get this error:

    >kick *
    13:55:35 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'kick' in plugin KiwiAdmin v2.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:312)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
    at ru.tehkode.permissions.compat.PermissionHandler.permission(PermissionHandler.java:72)
    at com.yottabyte.bukkit.KiwiAdmin.kickPlayer(KiwiAdmin.java:314)
    at com.yottabyte.bukkit.KiwiAdmin.onCommand(KiwiAdmin.java:230)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 6 more

    And when i use it in game using "/kick *" i get is error:

    org.bukkit.command.CommandException: Unhandled exception executing command 'kick' in plugin KiwiAdmin v2.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
    at com.yottabyte.bukkit.KiwiAdmin.kickPlayer(KiwiAdmin.java:317)
    at com.yottabyte.bukkit.KiwiAdmin.onCommand(KiwiAdmin.java:230)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
     
  5. Offline

    yottabyte

    @thestrike095
    Hm, I haven't tested that for a while...

    @cheepz
    The problem is, that is way too long to fit in the log in screen. Besides, it would require a remake of the way it stores ban times and it would just be too much of a pain to change..
     
  6. Offline

    thestriker095

    will there
    be a fix soon? for the /kick * because that is the main reason i got this plugin!
     
  7. Offline

    Mr_H4mm3r

    When the banned user are trying to login again?? Are the reason displayed then? If not please add if its possible
     
  8. Offline

    Hacr

    is there any way to kick all the players that are online?
     
  9. Offline

    thestriker095

    Yes there is use /kick *

    But atm that command is not working :(
     
  10. Offline

    Hacr

    ahhh,
    thanks anyway :D
     
  11. Offline

    malex

    Hi!
    Can I somehow make UTF-8 encoding in plugin?
    If simply create a database in UTF-8, the data is not stored correctly.
    Please help.
     
  12. Offline

    EtSSr

    You can also make a warn cmd like /warn player reason ? that should be usefull

    And u can update the plugin ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  13. Offline

    yottabyte

    What do you mean?
     
  14. Offline

    EtSSr

    It says always when i try to use a cmd there is an error
     
  15. Offline

    yottabyte

    Strange, still works here.
     
  16. Offline

    DjAli

    Really great plugin, thank you my friend, but can I advise you one thing..

    Please also add temporary IP bans and there is problem with unban

    If I type /unban (name) in the game then it will unban only nick, not an IP ban
     
  17. Offline

    Zixt

    Could you add a command to un-ipban people? Also, the reloadka seems not to reload the IP ban list.
     
  18. Offline

    Moo Master

    Whenever i do /ban this happens, and it seems similar to /kick *, And i use essentials, but just earlier it was working like a charm, then banned players started joining?

    Code:
    2011-07-27 19:06:17 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'ban' in plugin KiwiAdmin v2.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at com.yottabyte.bukkit.KiwiAdmin.banPlayer(KiwiAdmin.java:391)
        at com.yottabyte.bukkit.KiwiAdmin.onCommand(KiwiAdmin.java:227)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
    Any help?
     
  19. Offline

    H14

    Would it be possible for it to store a log of previous tempbans? As of now it only stores current active bans. We use the php script to look into them, but it would be nice if you could go back to the history and check if a users has been tempbanned before. If the tempban is done, the ban is removed from the table and we would like to have it keep logs of all those too. (If we need to make a decision about a punishment, we could look at the .php interface and see if they already have had several tempbans before so they can be punished appropriately).
     
  20. Offline

    JJD213

    Since yesterday when I kick/ban someone it doesn't appear that I kicked/banned them and their reason. Is this just another plugin blocking it, is something wrong or have you just changed that feature?
     
  21. Offline

    o0AzzA0o

    Feature request: Can we have a command like /banexport that exports all the banned players to original banned_players.txt file or what ever it is named. Its the one under the main server directory..... The reason for this request is lwc has a new command thats something like /lwc a purgebanned and what that does is remove all chest protections from players that are banned.... since they are no longer needed. The problem i have at the moment is that lwc pulls the banned player list from the original file so i have to manualy copy all the mysql entrys and move them over to the original text file.

    Another feature request i would like to make is to have /kiwiclean which would remove all the expired temp bans from the banlist.

    Thanks for this plugin it makes my life easyer and players like the fact they can check the banned list to see what is what.....
     
  22. Offline

    Moo Master

    Same thing happened, and i get that error that i posted in console.
     
  23. Offline

    kostet_9804

    cat u make theese commands:
    /ipban <IP> [reason]
    /tempipban <IP> <time> [reason]
    /unbanip <IP>
    to work with offline players
     
    Zixt likes this.
  24. Offline

    yottabyte

    @Moo Master
    Can you show the exact command you used? I can't seem to find what's wrong.

    Update 2.2
    • Fixed /kick *
    • Added /exportbans
    Thanks to @o0AzzA0o for the export bans idea.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  25. Offline

    Moo Master

    i did /ban
    And it didn't work.
     
  26. Offline

    yottabyte

    Well, you have to put a username after /ban
     
  27. Offline

    Moo Master

    I did, and banned users from before would be able to join the game.
     
  28. Offline

    o0AzzA0o

    Thanks very much for the new update/features
     
  29. Offline

    oliverw92

    Nice updates :) Any chance of a command to change the ban reason for a player? If there is a spammer/hacker you often don't have time to write a proper reason
     
  30. Offline

    Phinary

    I have been using this for a while. Think you can have a mute feature, been looking for a good mute for a while. There isnt many out there, and most of them arent persistant and dont allow you to mute offline players.
     
  31. Offline

    thestriker095

    It seems the /kick * is still not working after 2.2?

    Bukkit Build #1000
    KiwiAdmin v.2.2
    Console Error Message:

    19:41:04 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'kick' in plugin KiwiAdmin v2.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:312)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
     

Share This Page