Compare commits
5 Commits
0196cbb0c2
...
1fb6ece1be
Author | SHA1 | Date |
---|---|---|
Auke Kok | 1fb6ece1be | |
Auke Kok | 263e143e6c | |
Auke Kok | 9e199372b9 | |
Auke Kok | 9c85fe3e64 | |
Auke Kok | a6218b88e0 |
25
README
25
README
|
@ -52,6 +52,15 @@ factors involved, this number will almost never equal the number of
|
|||
modifications made per cycle - but increasing it will accelerate the
|
||||
erosion process.
|
||||
|
||||
/sedimentology snowblocks <integer>
|
||||
|
||||
Modify the number of blocks per cycle that the plugin will
|
||||
attempt to consider for snow accumulation. Snow only accumulates
|
||||
in proper conditions and daylight exposure will melt snow stacks
|
||||
down slowly. Snow growth and melt can happen in protected regions,
|
||||
and the thickness of the snow cover influences the erosion speed
|
||||
of involved blocks.
|
||||
|
||||
/sedimentology protect <boolean>
|
||||
|
||||
This option was removed in Sedimentology-6. Instead, the flag can be
|
||||
|
@ -82,6 +91,7 @@ overwritten if you change settings in the game (default settings
|
|||
shown here):
|
||||
|
||||
blocks: 10
|
||||
snowblocks: 10
|
||||
ticks: 1
|
||||
protect: true
|
||||
worlds:
|
||||
|
@ -94,6 +104,15 @@ the more blocks will move or decay. If 0, the plugin is effectively
|
|||
disabled. High numbers can cause lag and a high server load. Numbers
|
||||
above 500 are not advised for deployment even with high end servers.
|
||||
|
||||
- snowblocks:
|
||||
modifies the amount of attempts per world that the plugin
|
||||
makes each interval to stack/melt snow. The higher the number, the
|
||||
faster snow will accumulate to the maximum level, and the faster it
|
||||
will melt. In general, due to the weather cycle in minecraft, the
|
||||
default setting will cause snow to accumulate but not melt away. Higher
|
||||
settings will cause snow levels to fluctuate more wildly between thick
|
||||
covers and green ice plains.
|
||||
|
||||
- ticks:
|
||||
modifies the interval, in minecraft ticks, that the plugin
|
||||
will run as. There are 20 minecraft ticks in a second. Higher values
|
||||
|
@ -121,6 +140,12 @@ While I tested Factions and WorldGuard support thoroughly, I can't currently
|
|||
test Towny integration, so feedback appreciated if you can test this for me,
|
||||
and the result is as expected.
|
||||
|
||||
Tested are these versions:
|
||||
- Factions 1.6.9.5
|
||||
- Factions 2.3.0 with mcore 7.0.1
|
||||
- Towny 0.84.0.9
|
||||
- WorldGuard 5.8
|
||||
|
||||
Bugs / Code For bugs, tips, donations please feel free to contact me:
|
||||
|
||||
Auke Kok - auke@foo-projects.org
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
blocks: 10
|
||||
snowblocks: 100
|
||||
snowblocks: 10
|
||||
ticks: 1
|
||||
protect: true
|
||||
worlds:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: Sedimentology
|
||||
main: org.foo_projects.sofar.Sedimentology.Sedimentology
|
||||
version: 8
|
||||
softdepend: [Factions, Towny, WorldGuard]
|
||||
version: 10
|
||||
softdepend: [Factions, Towny, WorldGuard, Residence]
|
||||
commands:
|
||||
sedimentology:
|
||||
aliases: sed
|
||||
|
@ -9,3 +9,7 @@ commands:
|
|||
usage: /sedimentology ...
|
||||
permission: sedimentology
|
||||
permission-message: You do not have sufficient privileges to do that!
|
||||
permissions:
|
||||
sedimentology:
|
||||
description: Gives access to the sedimentology command
|
||||
default: op
|
||||
|
|
|
@ -27,6 +27,9 @@ import org.bukkit.World;
|
|||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
import com.bekvon.bukkit.residence.Residence;
|
||||
import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||
|
||||
import com.massivecraft.factions.entity.BoardColls;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.mcore.ps.PS;
|
||||
|
@ -100,6 +103,7 @@ public final class Sedimentology extends JavaPlugin {
|
|||
private boolean have_factions_old = false;
|
||||
private boolean have_towny = false;
|
||||
private boolean have_worldguard = false;
|
||||
private boolean have_residence = false;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private byte getData(Block block)
|
||||
|
@ -330,6 +334,11 @@ public final class Sedimentology extends JavaPlugin {
|
|||
ApplicableRegionSet set = rm.getApplicableRegions(block.getLocation());
|
||||
return (set.size() > 0);
|
||||
}
|
||||
if (have_residence) {
|
||||
ClaimedResidence res = Residence.getResidenceManager().getByLoc(block.getLocation());
|
||||
if (res != null)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1088,6 +1097,7 @@ displace:
|
|||
"/sedimentology enable <world> - enable for world\n" +
|
||||
"/sedimentology disable <world> - enable for world";
|
||||
|
||||
command:
|
||||
if (split.length >= 1) {
|
||||
switch (split[0]) {
|
||||
case "blocks":
|
||||
|
@ -1133,14 +1143,15 @@ displace:
|
|||
msg = "disabled for world \"" + split[1] + "\"";
|
||||
break;
|
||||
case "stats":
|
||||
World world = org.bukkit.Bukkit.getWorld("world");
|
||||
Chunk ChunkList[] = world.getLoadedChunks();
|
||||
long chunks = 0;
|
||||
for (SedWorld sw: sedWorldList)
|
||||
chunks += sw.world.getLoadedChunks().length;
|
||||
msg = String.format("blocks: %d snowblocks: %d ticks: %d protect: %s\n" +
|
||||
"considered %d, displaced %d, degraded %d blocks in %d chunks %d errors\nlast one at %d %d %d\n" +
|
||||
"ignored: edge %d, type %d, storm %d, vegetation %d, resistance %d, water %d, wave %d, sand %d, hardness %d, " +
|
||||
"protected %d, locked in %d, rate %d",
|
||||
conf_blocks, conf_snowblocks, conf_ticks, conf_protect ? "true" : "false",
|
||||
stat_considered, stat_displaced, stat_degraded, ChunkList.length, stat_errors,
|
||||
stat_considered, stat_displaced, stat_degraded, chunks, stat_errors,
|
||||
stat_lastx, stat_lasty, stat_lastz,
|
||||
stat_ignored_edge, stat_ignored_type, stat_ignored_storm, stat_ignored_vegetation,
|
||||
stat_ignored_resistance, stat_ignored_water, stat_ignored_wave, stat_ignored_sand, stat_ignored_hardness,
|
||||
|
@ -1172,12 +1183,10 @@ displace:
|
|||
for (int z = z1; z <= z2; z++)
|
||||
sw.sedBlock(x, z);
|
||||
msg = "test cycle finished";
|
||||
break;
|
||||
} else {
|
||||
msg = "Invalid world name - world must be enabled already";
|
||||
break;
|
||||
break command;
|
||||
}
|
||||
}
|
||||
msg = "Invalid world name - world must be enabled already";
|
||||
break;
|
||||
case "snowtest":
|
||||
if (split.length != 7) {
|
||||
|
@ -1205,12 +1214,10 @@ displace:
|
|||
for (int z = z1; z <= z2; z++)
|
||||
sw.sedSnowBlock(x, z);
|
||||
msg = "test cycle finished";
|
||||
break;
|
||||
} else {
|
||||
msg = "Invalid world name - world must be enabled already";
|
||||
break;
|
||||
break command;
|
||||
}
|
||||
}
|
||||
msg = "Invalid world name - world must be enabled already";
|
||||
break;
|
||||
case "help":
|
||||
default:
|
||||
|
@ -1323,11 +1330,15 @@ displace:
|
|||
/* WorldGuard */
|
||||
if (org.bukkit.Bukkit.getPluginManager().isPluginEnabled("WorldGuard"))
|
||||
have_worldguard = true;
|
||||
|
||||
if (org.bukkit.Bukkit.getPluginManager().isPluginEnabled("Residence"))
|
||||
have_residence = true;
|
||||
|
||||
getLogger().info("Protection plugins: " +
|
||||
(have_factions | have_factions_old ? "+" : "-") + "Factions, " +
|
||||
(have_towny ? "+" : "-") + "Towny, " +
|
||||
(have_worldguard ? "+" : "-") + "WorldGuard, "
|
||||
(have_worldguard ? "+" : "-") + "WorldGuard, " +
|
||||
(have_residence ? "+" : "-") + "Residence"
|
||||
);
|
||||
|
||||
conf_protect = getConfig().getBoolean("protect");
|
||||
|
|
Loading…
Reference in New Issue