RedProtect Anti-Grief

RedProtect Anti-Grief

73.3k Downloads

Question about Global regions and flags

Magnum97 opened this issue · 2 comments

commented

Is your feature request related to a problem? Please describe.
There is a mention on Spigot page about global region flags.

Describe the solution you'd like
I can not figure out how to set global flags. So I need to create a world wide region first?

Describe alternatives you've considered
WorldGuard installed along with RP to take care of world not under RP care.

Additional context
Please advise if we can do global region, do I need world guard?

commented

for global flags you have a file called globalflags.conf there u can define what counts for the whole world.
In config.conf you can define the default flags and there state when a new region is created.

So if you have no plugin that does not run if Worldgaurd is not on the server then usually you dont need it anymore
when using Redprotect.
Also most Arena and others can be designt as Regions with special flags :)

The file format redprotect uses is the json format. Its used in most files in the mainfolder. For Regions you can choose the good old YML. :D
To have a better look on files like that i recomment a fileeditor like Notepad++
Dont use the normal Windows Editor... files look crazzy and confusing in it.
Also here u find more and some descriptions in the wiki about the global flags


Here you have an example of our plotworld of our globalflags.conf file.

    plotworld {
        allow-changes-of {
            flow-damage=true
            # This don't bypass liquid-flow option.
            lava-flow=true
            leaves-decay=true
            # Allow any type of liquids to flow? Includes mod liquids.
            liquid-flow=true
            # This don't bypass liquid-flow option.
            water-flow=true
        }
        allow-crops-trample=true
        # Allow blocks to grow like wheat?
        block-grow=true
        # Deny players to bypass worldborders.
        border {
            deny-bypass=true
            execute-command="spawn {player}"
        }
        # Players can build in this world?
        build=false
        # Execute commands when a player get damaged by a specific type.
        # Placeholders: {player} to player name and {damage} to damage type.
        # List of types:
        # Sponge: https://jd.spongepowered.org/7.2.0/org/spongepowered/api/event/cause/entity/damage/DamageTypes.html
        # Spigot: https://hub.spigotmc.org/javadocs/spigot/index.html?overview-summary.html
        command-on-damage {
            VOID="spawn {player}"
        }
        # Execute commands in certain coordinate ranges.
        command-ranges {
            home-command {
                max-range=256.0
                message="&cYou cant use /home when mining or in caves!"
                min-range=0.0
            }
        }
        # Deny player death or get damage by this types of damage. List of types:
        # Sponge: https://jd.spongepowered.org/7.2.0/org/spongepowered/api/event/cause/entity/damage/DamageTypes.html
        # Spigot: https://hub.spigotmc.org/javadocs/spigot/index.html?overview-summary.html
        deny-death-by=[]
        # Control what items the player can use. Use '/rp debug-item' with the item in your hand to get the type.
        deny-item-usage {
            allow-on-claimed-rps=true
            allow-on-wilderness=false
            # The item names is like you see holding "F3" and pressing "H".
            items=[]
        }
        # Deny this types of potions to be used on this world.
        # Sponge: https://jd.spongepowered.org/7.2.0/org/spongepowered/api/effect/potion/PotionEffectTypes.html
        # Spigot: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionType.html
        deny-potions=[
            INVISIBILITY
        ]
        # Entities can damage blocks like enderman and creepers?
        entity-block-damage=false
        # Explosions can damage entities?
        explosion-entity-damage=false
        # Fire can damage blocks like leaves and woods?
        fire-block-damage=false
        # Allow fire spread?
        fire-spread=false
        iceform-by {
            entity=true
            player=true
        }
        # If build option is false, choose what blocks the player can place/break.
        # The item names is like you see holding "F3" and pressing "H".
        if-build-false {
            break-blocks {
                # This blocks will not be allowed to be break, all others yes.
                blacklist=[]
                # Only this blocks will be allowed to break, all others will not.
                # "minecraft:grass", "minecraft:tallgrass", "minecraft:red_flower", "minecraft:chest"
                whitelist=[]
            }
            place-blocks {
                # This blocks will not be allowed to be place, all others yes.
                blacklist=[]
                # Only this blocks will be allowed to place, all others will not.
                whitelist=[]
            }
        }
        # If interact option is false, choose what blocks or entity the player can interact.
        # The item names is like you see holding "F3" and pressing "H".
        # The entity name you can see enabling debug type "entity" on debug options and interacting with the entity.
        if-interact-false {
            # Allow player interactions with monsters?
            entity-monsters=true
            # Allow player interactions with passives?
            entity-passives=true
            interact-blocks {
                # This items will not be allowed to interact, all other items will be.
                blacklist=[]
                # Only this items will allowed to interact, all other item will not be allowed.
                # You can add this blocks to allow basic exploration (accept regex):
                # "minecraft:grass", "minecraft:tallgrass", "minecraft:red_flower", "minecraft:chest"
                whitelist=[]
            }
            interact-entities {
                # Only this entities will not be allowed to interact.
                blacklist=[]
                # Only this entities will be allowed to interact, all others no.
                whitelist=[
                    villager
                ]
            }
        }
        # Allow player interactions, with all entities or blocks?
        interact=false
        # Entities will be invincible?
        invincible=false
        # Execute this command on enter in this world.
        # You can use this placeholders: {world-from}, {world-to} and {player}
        on-enter-cmds=[]
        # Execute this command on exit this world.
        # You can use this placeholders: {world-from}, {world-to} and {player}
        on-exit-cmds=[]
        player-candrop=true
        player-canpickup=true
        player-glide {
            # Deny player boost using arrow and fireworks.
            allow-boost=true
            # Deny player to equip elytra.
            allow-elytra=true
            # Deny player to glide.
            allow-glide=true
        }
        # Players can damage monsters?
        player-hurt-monsters=true
        # Players can damage passive entities?
        player-hurt-passives=true
        player-velocity {
            allow-fly=true
            # Fly speed from 0.0 to 1. Default -1 to disable
            fly-speed=-1
            # Walk speed from 0.0 to 1. Default -1 to disable
            walk-speed=-1
        }
        # Allow pvp?
        pvp=true
        # Allow entities to spawn only inside regions if blacklisted/whitelisted?
        spawn-allow-on-regions=false
        # spawn-blacklist: This mobs will NOT spawn in this world!
        # 
        # You can use MONSTERS or PASSIVES groups.
        # Check the entity types here:
        # Spigot: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
        # Sponge: https://jd.spongepowered.org/7.2.0/org/spongepowered/api/entity/EntityTypes.html
        spawn-blacklist=[
            PHANTOM,
            VILLAGER,
            MONSTERS,
            MONSTER,
            PASSIVES,
            PASSIVE
        ]
        # spawn-whitelist: ONLY this mobs will spawn in this world!
        # 
        # You can use MONSTERS or PASSIVES groups.
        # Check the entity types here:
        # Spigot: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
        # Sponge: https://jd.spongepowered.org/7.2.0/org/spongepowered/api/entity/EntityTypes.html
        spawn-whitelist=[]
        # Allow players to place Minecarts and Boats?
        use-minecart=true
        weather {
            # Allow weather changes?
            allow-weather=true
            # Every x attempts will rain.
            attempts-before-rain=3
            # The duration of weather rain.
            rain-time=60
        }
    }
commented

Great help! Glad to know I can remove WorldGuard - and thank you very much for the example conf.