Skip to content

Commit

Permalink
Merge pull request #5 from TownyAdvanced/master
Browse files Browse the repository at this point in the history
Update to 0.100.1.3
  • Loading branch information
CorruptedGreed authored Jan 19, 2024
2 parents 9f8afb4 + a002e07 commit 768fcf7
Show file tree
Hide file tree
Showing 102 changed files with 3,906 additions and 2,205 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ___

<table>
<tr><th> Minecraft Version</th><th>Towny Version</th></tr>
<tr align=center><td> MC 1.20.* </td><td rowspan=5> Use <a href=https://github.com/TownyAdvanced/Towny/releases/tag/0.100.0.0>0.100.0.0</a> or the <a href=https://github.com/TownyAdvanced/Towny/releases>the Latest Pre-Release.</a></td>
<tr align=center><td> MC 1.20.* </td><td rowspan=5> Use <a href=https://github.com/TownyAdvanced/Towny/releases/tag/0.100.1.0>0.100.1.0</a> or the <a href=https://github.com/TownyAdvanced/Towny/releases>the Latest Pre-Release.</a></td>
<tr align=center><td> MC 1.19.* </td>
<tr align=center><td> MC 1.18.* </td>
<tr align=center><td> MC 1.17.* </td>
Expand Down
10 changes: 5 additions & 5 deletions Towny/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<artifactId>towny</artifactId>
<packaging>jar</packaging>
<version>0.100.0.18</version>
<version>0.100.1.4</version>

<licenses>
<license>
Expand Down Expand Up @@ -84,7 +84,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -250,13 +250,13 @@
<dependency>
<groupId>net.coreprotect</groupId>
<artifactId>coreprotect</artifactId>
<version>22.2</version>
<version>22.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.seeseemelk</groupId>
<artifactId>MockBukkit-v1.20</artifactId>
<version>3.58.0</version>
<version>3.65.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -472,7 +472,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.3</version>
<version>3.2.5</version>
<configuration>
<skipTests>${skipTests}</skipTests>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,11 @@ public enum ConfigNodes {
GTOWN_SETTINGS_REGEN_ENABLE(
"global_town_settings.health_regen.enable",
"true"),
GTOWN_SETTINGS_REGEN_PREVENT_SATURATION_LOSS(
"global_town_settings.saturation_regen.also_prevent_saturation_loss",
"true",
"",
"# When true players cannot become hungrier when in their own or an allied town."),

GTOWN_SETTINGS_PVP_COOLDOWN_TIMER(
"global_town_settings.pvp_cooldown_time",
Expand Down Expand Up @@ -985,6 +990,12 @@ public enum ConfigNodes {
"# The maximum townblocks available to a town is (numResidents * ratio).",
"# Setting this value to 0 will instead use the level based jump values determined in the town level config.",
"# Setting this to -1 will result in every town having unlimited claims."),
CLAIMING_DEF_BONUS_CLAIMS(
"claiming.new_town_bonus_claims",
"0",
"",
"# An amount of additional townblocks that a town will receive when it is first created, in addition to any amount given via the town_block_ratio or town_levels.",
"# As an example: This can be used to add 10 townblocks to a town when it is made so the borders can be grown a bit more before the mayor has to seek out residents."),
CLAIMING_TOWN_BLOCK_LIMIT(
"claiming.town_block_limit",
"0",
Expand All @@ -1000,6 +1011,11 @@ public enum ConfigNodes {
"# at the cost of more work setting up. Also, extremely small values will render the caching done useless.",
"# Each cell is (town_block_size * town_block_size * height-of-the-world) in size, with height-of-the-world",
"# being from the bottom to the top of the build-able world."),
CLAIMING_SHOW_CLAIM_PARTICLES(
"claiming.show_claiming_particles",
"true",
"",
"# When false players will not see the particle flood effect when they claim townblocks."),
CLAIMING_MIN_ADJACENT_BLOCKS(
"claiming.min_adjacent_blocks",
"-1",
Expand Down Expand Up @@ -1553,7 +1569,7 @@ public enum ConfigNodes {
"",
"# Spams the player named in dev_name with all messages related to towny."),
PLUGIN_DEV_MODE_ENABLE("plugin.dev_mode.enable", "false"),
PLUGIN_DEV_MODE_DEV_NAME("plugin.dev_mode.dev_name", "ElgarL"),
PLUGIN_DEV_MODE_DEV_NAME("plugin.dev_mode.dev_name", "LlmDl"),
PLUGIN_RESET_LOG_ON_BOOT(
"plugin.reset_log_on_boot",
"true",
Expand Down Expand Up @@ -3025,6 +3041,12 @@ public enum ConfigNodes {
"",
"# If true players will only be able to use /t deposit, /t withdraw, /n deposit & /n withdraw while inside bank plots belonging to the town or nation capital respectively.",
"# Home plots will also allow deposit and withdraw commands."),
BANK_BANK_PLOTS_STOP_HOME_BLOCK_BEING_USED(
"bank.do_homeblocks_not_work_when_a_town_has_bank_plots",
"false",
"",
"# If true, towns which have one or more bank plots will no longer be able to use their homeblock for withdraw/depositing.",
"# Requires the above is_banking_limited_to_bank_plots to be true as well."),

TOWN_RUINING_HEADER("town_ruining", "", "", "",
"############################################################",
Expand Down
34 changes: 34 additions & 0 deletions Towny/src/main/java/com/palmergames/bukkit/towny/TownyAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.palmergames.bukkit.towny.permissions.PermissionNodes;
import com.palmergames.bukkit.towny.tasks.TeleportWarmupTimerTask;
import com.palmergames.bukkit.towny.utils.CombatUtil;
import com.palmergames.bukkit.towny.utils.ProximityUtil;
import com.palmergames.bukkit.util.BukkitTools;
import com.palmergames.util.MathUtil;

Expand Down Expand Up @@ -932,4 +933,37 @@ public void testPlotOwnerOrThrow(@NotNull Resident resident, @NotNull TownBlock
// Nothing to complain about, this resident is the owner of the townblock's town or an admin.
}
}

/**
* Test a WorldCoord to see if Towny would allow the area to be claimed by the
* given town.
*
* @param town Town who would become owner of the land.
* @param coordToClaim WorldCoord which is to be claimed.
* @param outpost whether this would be an outpost, with no connected town
* land.
* @param newTown whether this would be a brand new town claiming their
* first plot.
* @throws TownyException thrown when Towny would not allow the claim, with
* message for the reason why.
*/
public void testTownClaimOrThrow(Town town, WorldCoord coordToClaim, boolean outpost, boolean newTown) throws TownyException {
if (newTown)
ProximityUtil.allowTownHomeBlockOrThrow(coordToClaim.getTownyWorld(), coordToClaim, town, true);

ProximityUtil.allowTownClaimOrThrow(coordToClaim.getTownyWorld(), coordToClaim, town, outpost);
}

/**
* Test a WorldCoord to see if Towny would allow the area to be unclaimed by the
* given town.
*
* @param town Town that would unclaim the land.
* @param coordToUnclaim WorldCoord which is to be unclaimed.
* @throws TownyException thrown when Towny would not allow the unclaim, with
* message for the reason why.
*/
public void testTownUnclaimOrThrow(Town town, WorldCoord coordToUnclaim) throws TownyException {
ProximityUtil.allowTownUnclaimOrThrow(coordToUnclaim.getTownyWorld(), coordToUnclaim, town);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public enum CommandType {
NATION_SET,
NATION_TOGGLE,
TOWN,
TOWN_BUY,
TOWN_SET,
TOWN_TOGGLE,
PLOT,
Expand Down
Loading

0 comments on commit 768fcf7

Please sign in to comment.