-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13e67df
commit 1f3376c
Showing
5 changed files
with
93 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.cjburkey.claimchunk.flags; | ||
|
||
public class PermFlag { | ||
|
||
// TODO: INCLUDE BLOCK/ENTITY PROTECTIONS | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/cjburkey/claimchunk/flags/PermFlags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.cjburkey.claimchunk.flags; | ||
|
||
import java.io.File; | ||
import java.util.HashMap; | ||
|
||
public class PermFlags { | ||
|
||
private final File flagsFile; | ||
private final HashMap<String, PermFlag> flagMap = new HashMap<>(); | ||
|
||
public PermFlags(File flagsFile) { | ||
this.flagsFile = flagsFile; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# List of flags that players can customize within their claims. | ||
|
||
permissionFlags: | ||
breakBlocks: | ||
# Blocks | ||
- for: BLOCKS # BLOCKS or ENTITIES | ||
type: BREAK # For blocks, can be BREAK, PLACE, INTERACT, or EXPLODE | ||
# If no `include` or `exclude` (cannot be used together, btw) | ||
# is present, the default is to include all blocks/entities. | ||
# If `include` is present, only the provided entities/entity | ||
# classes will be included. | ||
# The opposite is true of `exclude`, which includes all | ||
# default blocks/items and excludes the provided ones. | ||
placeBlocks: | ||
- for: BLOCKS | ||
type: PLACE | ||
interactBlocks: | ||
- for: BLOCKS | ||
type: INTERACT | ||
exclude: ['@REDSTONE', '@DOORS', '@BLOCK_CONTAINERS'] # Handle these separately | ||
redstone: | ||
- for: BLOCKS | ||
type: INTERACT | ||
include: ['@REDSTONE'] | ||
doors: | ||
- for: BLOCKS | ||
type: INTERACT | ||
include: ['@DOORS'] | ||
|
||
# Entities | ||
damageEntities: | ||
- for: ENTITIES | ||
type: DAMAGE | ||
interactEntities: | ||
- for: ENTITIES | ||
type: INTERACT | ||
exclude: ['@VEHICLES'] | ||
vehicles: | ||
- for: ENTITIES | ||
type: INTERACT | ||
include: ['@VEHICLES'] | ||
|
||
# Can also handle both types with one flag | ||
containers: | ||
- for: BLOCKS | ||
type: INTERACT | ||
include: ['@BLOCK_CONTAINERS'] | ||
- for: ENTITIES | ||
type: INTERACT | ||
include: ['@VEHICLE_CONTAINERS'] | ||
|
||
# Explosions | ||
explodeHurt: | ||
- for: ENTITIES | ||
type: EXPLODE | ||
explodeDamage: | ||
- for: BLOCKS | ||
type: EXPLODE |