Skip to content

Commit

Permalink
Add DOOR block class
Browse files Browse the repository at this point in the history
  • Loading branch information
cjburkey01 committed Feb 4, 2022
1 parent c27e99f commit eecd471
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![ClaimChunk Logo](imgs/icon64.png)
![ClaimChunk Title](imgs/logo_carrier.png)

[![Version Info](https://img.shields.io/static/v1?label=Version&message=0.0.23-RC5&color=blueviolet&style=for-the-badge)](https://github.com/cjburkey01/ClaimChunk/releases)
[![Version Info](https://img.shields.io/static/v1?label=Version&message=0.0.23-RC6&color=blueviolet&style=for-the-badge)](https://github.com/cjburkey01/ClaimChunk/releases)
[![Download Info](https://img.shields.io/static/v1?label=Spigot&message=1.18.1&color=blueviolet&style=for-the-badge)](https://www.spigotmc.org/resources/claimchunk.44458/)
[![Servers Using Claimchunk](https://img.shields.io/bstats/servers/5179?label=Servers&color=cornflowerblue&style=for-the-badge)](https://bstats.org/plugin/bukkit/ClaimChunk)
[![Players Using Claimchunk](https://img.shields.io/bstats/players/5179?label=Players&color=cornflowerblue&style=for-the-badge)](https://bstats.org/plugin/bukkit/ClaimChunk)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
}

object DepData {
const val LIVE_VERSION = "0.0.23-RC5";
const val LIVE_VERSION = "0.0.23-RC6";
const val THIS_VERSION = "0.0.23-RC6";
const val PLUGIN_NAME = "ClaimChunk";
const val ARCHIVES_BASE_NAME = "claimchunk";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.io.File;
import java.util.*;
import java.util.stream.Collectors;

// TODO: ADD TONS OF COMMENTS THIS IS SO RIDICULOUS!
public class ClaimChunkWorldProfileHandler {
Expand Down Expand Up @@ -216,8 +217,8 @@ public void unloadAllProfiles() {

// Assign block defaults
claimedChunks.blockAccesses.put(Material.AIR, new BlockAccess(false, false, false, false));
claimedChunks.blockAccessClassMapping.put(
"REDSTONE", new BlockAccess(true, false, false, false));
claimedChunks.blockAccessClassMapping.put("REDSTONE", new BlockAccess(true, false, false, false));
claimedChunks.blockAccessClassMapping.put("DOOR", new BlockAccess(false, false, false, false));
unclaimedChunks.blockAccesses.put(Material.AIR, new BlockAccess(true, true, true, true));

// Create the profile
Expand Down Expand Up @@ -305,6 +306,11 @@ public void unloadAllProfiles() {
Material.STONE_BUTTON));
blockAccessMapping.put("REDSTONE", redstone);

// Add door blocks
HashSet<Material> doors =
Arrays.stream(Material.values()).filter(mat -> mat.name().endsWith("_DOOR")).collect(Collectors.toCollection(HashSet::new));
blockAccessMapping.put("DOOR", doors);

return blockAccessMapping;
}
}

0 comments on commit eecd471

Please sign in to comment.