Skip to content

Commit

Permalink
- Refactor max residents per town code into TownUtil accessed via a
Browse files Browse the repository at this point in the history
new Town method.
  - Bump Spigot 1.20.2 to 1.20.4.
  - Bump com.github.seeseemelk:MockBukkit-v1.20 from 3.60.0 to 3.65.0.
  - Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.3 to
3.2.5.
  • Loading branch information
LlmDl committed Jan 18, 2024
1 parent 838339f commit a002e07
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 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.1.3</version>
<version>0.100.1.4</version>

<licenses>
<license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,12 @@ public void onPotionSplashEvent(PotionSplashEvent event) {

/*
* Check to see if any of the potion effects are protected.
* TODO: Make up a wrapper of some kind in order to support older versions while
* using the new methods when possible.
*/

if (detrimentalPotions.contains(effect.getType().getName())) {
@SuppressWarnings("deprecation")
String name = effect.getType().getName();
if (detrimentalPotions.contains(name)) {
detrimental = true;
break;
}
Expand Down Expand Up @@ -939,7 +942,9 @@ private boolean hasDetrimentalEffects(Collection<PotionEffect> effects) {
final List<String> detrimentalPotions = TownySettings.getPotionTypes().stream().map(type -> type.toLowerCase(Locale.ROOT)).collect(Collectors.toList());

for (final PotionEffect effect : effects) {
// This should use getKey when 1.18 becomes the minimum supported version.
// TODO: Make up a wrapper of some kind in order to support older versions while
// using the new methods when possible.
@SuppressWarnings("deprecation")
final String name = effect.getType().getName().toLowerCase(Locale.ROOT);

/*
Expand Down
7 changes: 6 additions & 1 deletion Towny/src/main/resources/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9464,4 +9464,9 @@ v0.92.0.11:
- New Config Option: claiming.new_town_bonus_claims
- Default: 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.
- 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.
0.100.1.4:
- Refactor max residents per town code into TownUtil accessed via a new Town method.
- Bump Spigot 1.20.2 to 1.20.4.
- Bump com.github.seeseemelk:MockBukkit-v1.20 from 3.60.0 to 3.65.0.
- Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.3 to 3.2.5.

0 comments on commit a002e07

Please sign in to comment.