Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected void wireup(ConfigurationSection config) {
if (this.disableNetheriteCrafting) plugin().log(" Disable Netherite Crafting enabled.");

this.goldBlockTeleport = config.getBoolean("goldBlockTeleport", false);
if (this.personalDeathMessages) plugin().log(" Gold block teleporter enabled.");
if (this.goldBlockTeleport) plugin().log(" Gold block teleporter enabled.");

/* Add additional feature config grabs here. */
}
Expand Down Expand Up @@ -178,7 +178,7 @@ public boolean isDisableNetheriteCrafting() {
}

public boolean isGoldblockTeleport() {
return goldBlockTeleport;
return this.goldBlockTeleport;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class GameTuningConfig extends SimpleHackConfig {
private boolean rainReduction;
private double rainOccurrenceChance;

private boolean allowVoxelMapCaveMode;

private Set<Material> noPlace;

public GameTuningConfig(SimpleAdminHacks plugin, ConfigurationSection base) {
Expand Down Expand Up @@ -117,6 +119,9 @@ protected void wireup(ConfigurationSection config) {
this.badOmen = config.getBoolean("badOmen", false);
if (!badOmen) plugin().log("Bad Omen effect is disabled.");

this.allowVoxelMapCaveMode = config.getBoolean("allowVoxelMapCaveMode", false);
if (!allowVoxelMapCaveMode) plugin().log("VoxelMap Cavemode disallowed.");

noPlace = new HashSet<>();
if(config.isList("noplace")) {
for(String entry : config.getStringList("noplace")) {
Expand Down Expand Up @@ -331,6 +336,10 @@ public double getRainOccurrenceChance() {
return rainOccurrenceChance;
}

public boolean allowVoxelMapCaveMode() {
return allowVoxelMapCaveMode;
}

public boolean canPlace(Material mat) {
return !noPlace.contains(mat);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.bukkit.event.player.PlayerBedEnterEvent.BedEnterResult;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
Expand Down Expand Up @@ -483,5 +484,12 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command
return true;
}

@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onPlayerJoin(PlayerJoinEvent event) {
if (!config.isEnabled() || config.allowVoxelMapCaveMode()) {
return;
}
event.getPlayer().sendMessage("§3 §6 §3 §6 §3 §6 §d ");
}

}
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ hacks:
rainReduction:
enabled: false
rainOccurrenceChance: .5
allowVoxelMapCaveMode: false
HorseStats:
enabled: false
wand: COMPASS
Expand Down