Skip to content

Commit

Permalink
Version 1.4.4 (#29)
Browse files Browse the repository at this point in the history
* Version 1.4.3

* Remove sync chunk loading when twerking

#24

* WIP putting back tree growing code.

* Version 1.4.4

* Revert back to the original way to grow trees.

Apparently, the bee hive bug has been fixed. This will therefore prevent
trees growing outside of the island border again.

#23
#9

* Add 1.17 and 1.19 trees to the twerking.

* Added GitHubs action script and funding info

* Update pom.xml

* Fix javadoc plugin in POM

---------

Co-authored-by: BONNe <bonne@bonne.id.lv>
  • Loading branch information
tastybento and BONNe committed Oct 14, 2023
1 parent de62795 commit a047279
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 47 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: tastybento
patreon: bentoboxworld
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build
on:
push:
branches:
- develop
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
14 changes: 9 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<java.version>1.8</java.version>
<powermock.version>2.0.4</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.16.5-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.19.1-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.14.0-SNAPSHOT</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.4.3</build.version>
<build.version>1.4.4</build.version>
<build.number>-LOCAL</build.number>
</properties>

Expand Down Expand Up @@ -224,15 +224,19 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<version>3.4.1</version>
<configuration>
<show>public</show>
<source>${java.version}</source>
<show>private</show>
<quiet>true</quiet>
<failOnError>false</failOnError>
<additionalJOption>-Xdoclint:none</additionalJOption>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
Expand Down Expand Up @@ -265,7 +269,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<version>0.8.10</version>
<configuration>
<append>true</append>
<excludes>
Expand Down
125 changes: 88 additions & 37 deletions src/main/java/world/bentobox/twerk/Settings.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package world.bentobox.twerk;

import org.bukkit.Effect;
import org.bukkit.Sound;

import world.bentobox.bentobox.api.configuration.ConfigComment;
Expand All @@ -19,7 +20,7 @@ public class Settings implements ConfigObject {
@ConfigComment("If the player has not twerked enough, then the tree will not grow faster.")
@ConfigEntry(path = "minimum-twerks")
private int minimumTwerks = 4;

@ConfigComment("Range to look for saplings when twerking. A range of 5 will look +/- 5 blocks in all directions around the player")
@ConfigComment("Making this too big will lag your server.")
@ConfigEntry(path = "range")
Expand All @@ -41,94 +42,144 @@ public class Settings implements ConfigObject {
@ConfigEntry(path = "sounds.twerk.pitch")
private double soundsTwerkPitch = 2.0F;

@ConfigComment("Sound that plays when a small tree (1x1) grows.")
@ConfigComment("Available sounds are the following:")
@ConfigComment(" https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html")
@ConfigEntry(path = "sounds.growing-small-tree.sound")
private Sound soundsGrowingSmallTreeSound = Sound.BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT;

@ConfigEntry(path = "sounds.growing-small-tree.volume")
private double soundsGrowingSmallTreeVolume = 1.0F;

@ConfigEntry(path = "sounds.growing-small-tree.pitch")
private double soundsGrowingSmallTreePitch = 1.0F;

@ConfigComment("Sound that plays when a big tree (2x2) grows.")
@ConfigComment("Available sounds are the following:")
@ConfigComment(" https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html")
@ConfigEntry(path = "sounds.growing-big-tree.sound")
private Sound soundsGrowingBigTreeSound = Sound.BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT;

@ConfigEntry(path = "sounds.growing-big-tree.volume")
private double soundsGrowingBigTreeVolume = 1.0F;

@ConfigEntry(path = "sounds.growing-big-tree.pitch")
private double soundsGrowingBigTreePitch = 1.0F;

@ConfigComment("Toggle on/off the particle effects.")
@ConfigEntry(path = "effects.enabled")
private boolean effectsEnabled = true;

/**
* @return the minimumTwerks
*/
@ConfigComment("Effect that plays each time the player twerks.")
@ConfigComment("Available effects are the following:")
@ConfigComment(" https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html")
@ConfigEntry(path = "effects.twerk")
private Effect effectsTwerk = Effect.MOBSPAWNER_FLAMES;

public int getMinimumTwerks() {
return minimumTwerks;
}

/**
* @param minimumTwerks the minimumTwerks to set
*/
public void setMinimumTwerks(int minimumTwerks) {
this.minimumTwerks = minimumTwerks;
}

/**
* @return the soundsEnabled
*/
public boolean isSoundsEnabled() {
return soundsEnabled;
}

/**
* @param soundsEnabled the soundsEnabled to set
*/
public void setSoundsEnabled(boolean soundsEnabled) {
this.soundsEnabled = soundsEnabled;
}

/**
* @return the soundsTwerkSound
*/
public Sound getSoundsTwerkSound() {
return soundsTwerkSound;
}

/**
* @param soundsTwerkSound the soundsTwerkSound to set
*/
public void setSoundsTwerkSound(Sound soundsTwerkSound) {
this.soundsTwerkSound = soundsTwerkSound;
}

/**
* @return the soundsTwerkVolume
*/
public double getSoundsTwerkVolume() {
return soundsTwerkVolume;
}

/**
* @param soundsTwerkVolume the soundsTwerkVolume to set
*/
public void setSoundsTwerkVolume(double soundsTwerkVolume) {
this.soundsTwerkVolume = soundsTwerkVolume;
}

/**
* @return the soundsTwerkPitch
*/
public double getSoundsTwerkPitch() {
return soundsTwerkPitch;
}

/**
* @param soundsTwerkPitch the soundsTwerkPitch to set
*/
public void setSoundsTwerkPitch(double soundsTwerkPitch) {
this.soundsTwerkPitch = soundsTwerkPitch;
}

/**
* @return the effectsEnabled
*/
public Sound getSoundsGrowingSmallTreeSound() {
return soundsGrowingSmallTreeSound;
}

public void setSoundsGrowingSmallTreeSound(Sound soundsGrowingSmallTreeSound) {
this.soundsGrowingSmallTreeSound = soundsGrowingSmallTreeSound;
}

public double getSoundsGrowingSmallTreeVolume() {
return soundsGrowingSmallTreeVolume;
}

public void setSoundsGrowingSmallTreeVolume(double soundsGrowingSmallTreeVolume) {
this.soundsGrowingSmallTreeVolume = soundsGrowingSmallTreeVolume;
}

public double getSoundsGrowingSmallTreePitch() {
return soundsGrowingSmallTreePitch;
}

public void setSoundsGrowingSmallTreePitch(double soundsGrowingSmallTreePitch) {
this.soundsGrowingSmallTreePitch = soundsGrowingSmallTreePitch;
}

public Sound getSoundsGrowingBigTreeSound() {
return soundsGrowingBigTreeSound;
}

public void setSoundsGrowingBigTreeSound(Sound soundsGrowingBigTreeSound) {
this.soundsGrowingBigTreeSound = soundsGrowingBigTreeSound;
}

public double getSoundsGrowingBigTreeVolume() {
return soundsGrowingBigTreeVolume;
}

public void setSoundsGrowingBigTreeVolume(double soundsGrowingBigTreeVolume) {
this.soundsGrowingBigTreeVolume = soundsGrowingBigTreeVolume;
}

public double getSoundsGrowingBigTreePitch() {
return soundsGrowingBigTreePitch;
}

public void setSoundsGrowingBigTreePitch(double soundsGrowingBigTreePitch) {
this.soundsGrowingBigTreePitch = soundsGrowingBigTreePitch;
}

public boolean isEffectsEnabled() {
return effectsEnabled;
}

/**
* @param effectsEnabled the effectsEnabled to set
*/
public void setEffectsEnabled(boolean effectsEnabled) {
this.effectsEnabled = effectsEnabled;
}

public Effect getEffectsTwerk() {
return effectsTwerk;
}

public void setEffectsTwerk(Effect effectsTwerk) {
this.effectsTwerk = effectsTwerk;
}

/**
* @return the range
*/
Expand Down

0 comments on commit a047279

Please sign in to comment.