[plugin]BlockProtection

  • Ok guys i have made a block protection script


    What it does


    This plugin stops griefing of blocks over your whole server but it does have some limitations ATM


    All admins can still remove all blocks but when an admin removes blocks that a griefer has put down, the user name who placed the block is shown, this makes it simple to ban that user as you know who placed the unwanted block


    for the blocks only the user who placed them or an admin is able to remove them this can make it hard ATM for group building but i intend to change that
    also the API does not support this script for getting every block info when laying in lines, this means if lines are laid not all blocks are protected this should change on the next API update
    as i have talked to @red51 about this



    ATM there is no commands


    i have only done limited testing so if you find any bugs please do let me know.


    Also ideas are always welcome

    Files

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

    Edited 3 times, last by yahgiggle ().

  • nice, will download to do some testing :)


    btw will this be in theory incorporated in an AreaProtection plugin in the end?

  • nice, will download to do some testing :)


    btw will this be in theory incorporated in an AreaProtection plugin in the end?

    this is experimental also its over the hole server not just selected areas BTW i have found a bug thats not making it work on servers as expected im working on it right now

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • How does it work ? i get a message every block i place, but i can remove , destroy blocks from others... with a message in the chat but it is possible.


    I thought this plug in prevents such destroying...


    i installed it on the server... is it recommended to install it on the client too ?

  • How does it work ? i get a message every block i place, but i can remove , destroy blocks from others... with a message in the chat but it is possible.


    I thought this plug in prevents such destroying...

    @yahgiggle would have to confirm but I believe this plugin only protects blocks placed after its installation and also blocks that have been placed individually so not with left click drag and right click place block line. (this is a fault at the API and as mentioned in the first post will be fixed by red51 in the next update)

    i installed it on the server... is it recommended to install it on the client too ?

    It doesn't matter as the server doesn't care if the client has ant plugin installed, in RW only the server needs the plugins and every player can join, it is not like other games where both the client and the server have to have the plugins/mods installed.

  • ok, thanks....


    i tested it on blocks placed after the install of the plugin. and everyone can remove the blocks....with a message who was the owner but the destruxtion
    is not prevented.

  • did you test it on blocks that were individually (i.e. one at a time) placed? or on blocks placed by dragging a block line and placing it?


    Also by everyone do you mean server admins or did you also try it with non-admin players?

  • non admin players and those were single blocks


    i placed the Blockprotection.jar file in a Blockprotection folder in the plugins folder


    hopefully that this is right

  • yes that is correct the file system for all plugins should look like this:
    Plugins
    |---PluginName
    |---|---PluginName.jar


    hmm weird I think @yahgiggle would have to try to help you out from here on, I checked his code and everything seems correct (though a bit more complex than it has to be :P ) in order to protect blocks no idea why it is not doing it for your server. Tbh I haven't tried it with non-admin players in MP yet myself.

  • yes that is correct the file system for all plugins should look like this:
    Plugins
    |---PluginName
    |---|---PluginName.jar


    hmm weird I think @yahgiggle would have to try to help you out from here on, I checked his code and everything seems correct (though a bit more complex than it has to be :P ) in order to protect blocks no idea why it is not doing it for your server. Tbh I haven't tried it with non-admin players in MP yet myself.

    The blocks are only protected from other players if you place a block, You own it oO, so of cause you can also remove it, the only other players that can remove it are Admin's, if you lay lines of blocks only the first block is protected, that's to do with the api and is going to be fixed by Red51 Note if you lay the block in a protected area/zone, then that plugin may let any user smash the block who is also added to that area, I have not tested this yet, but that could be whats going on.

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • you need a way to find all the blocks a greafer sets and a way for admins to be able to remove them before they are banned or even after being banned if possible.


    Is there planed a version of this for PNB?


    also there needs to be a way admin can protect blocks that already exist. I have many bridges I wish to protect and roadways. Mabey even set owner of unowned blocks. This would allow for conversion of old worlds. There is blueprinting things to replace blocks but that is a lot of work.

  • you need a way to find all the blocks a greafer sets and a way for admins to be able to remove them before they are banned or even after being banned if possible.


    Is there planed a version of this for PNB?


    also there needs to be a way admin can protect blocks that already exist. I have many bridges I wish to protect and roadways. Mabey even set owner of unowned blocks. This would allow for conversion of old worlds. There is blueprinting things to replace blocks but that is a lot of work

    ive realy been looking into the api lately to see what can be down, ive not seen a way to protect all blocks yet but if i see something i will indeed code it.

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • Started a new server, added the plugin.
    It comes up saying I am using the plugin but, when I do the/bp it does nothing.
    In the event viewer I get this error below error.
    When I place block I get ID number not player name.
    Please advise.
    ADD PLUGIN: 1API: REGISTER LISTENER class blockprotection.BlockProtectionPlugin BlockProtection: Missing @EventMethod annotation for method onPlayerEnterWorldpartEventPlugin BlockProtection: Missing @EventMethod annotation for method onPlayerConnectEventChest plugin loaded successfully!SQLite: plugins\BlockProtection/database.db

    DEATH AND DESTRUCTION PVP
    192.154.229.151:4255


Participate now!

Don’t have an account yet? Create a new account now and be part of our community!