mirror of
https://github.com/songoda/UltimateTimber.git
synced 2024-09-28 21:57:30 +02:00
Merge branch 'development'
This commit is contained in:
commit
ef7c7ac4fa
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateTimber</artifactId>
|
<artifactId>UltimateTimber</artifactId>
|
||||||
<version>2.2.5</version>
|
<version>2.2.6</version>
|
||||||
<relativePath>../../</relativePath>
|
<relativePath>../../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateTimber</artifactId>
|
<artifactId>UltimateTimber</artifactId>
|
||||||
<version>2.2.5</version>
|
<version>2.2.6</version>
|
||||||
<relativePath>../../</relativePath>
|
<relativePath>../../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ import org.bukkit.event.Listener;
|
|||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class TreeFallManager extends Manager implements Listener {
|
public class TreeFallManager extends Manager implements Listener {
|
||||||
@ -95,7 +94,7 @@ public class TreeFallManager extends Manager implements Listener {
|
|||||||
isValid = false;
|
isValid = false;
|
||||||
|
|
||||||
if (ConfigurationManager.Setting.HOOKS_REQUIRE_ABILITY_ACTIVE.getBoolean()
|
if (ConfigurationManager.Setting.HOOKS_REQUIRE_ABILITY_ACTIVE.getBoolean()
|
||||||
&& McMMOHook.isUsingTreeFeller(player))
|
&& !McMMOHook.isUsingTreeFeller(player))
|
||||||
isValid = false;
|
isValid = false;
|
||||||
|
|
||||||
boolean alwaysReplantSapling = ConfigurationManager.Setting.ALWAYS_REPLANT_SAPLING.getBoolean();
|
boolean alwaysReplantSapling = ConfigurationManager.Setting.ALWAYS_REPLANT_SAPLING.getBoolean();
|
||||||
@ -142,8 +141,9 @@ public class TreeFallManager extends Manager implements Listener {
|
|||||||
|
|
||||||
boolean isCreative = player.getGameMode().equals(GameMode.CREATIVE);
|
boolean isCreative = player.getGameMode().equals(GameMode.CREATIVE);
|
||||||
|
|
||||||
if (!isCreative)
|
if (!isCreative) {
|
||||||
new SItemStack(tool).addDamage(player, toolDamage);
|
new SItemStack(tool).addDamage(player, toolDamage, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (ConfigurationManager.Setting.HOOKS_APPLY_EXPERIENCE.getBoolean()) {
|
if (ConfigurationManager.Setting.HOOKS_APPLY_EXPERIENCE.getBoolean()) {
|
||||||
McMMOHook.addWoodcutting(player, detectedTree.getDetectedTreeBlocks().getAllTreeBlocks().stream()
|
McMMOHook.addWoodcutting(player, detectedTree.getDetectedTreeBlocks().getAllTreeBlocks().stream()
|
||||||
@ -169,6 +169,7 @@ public class TreeFallManager extends Manager implements Listener {
|
|||||||
* Checks if a player is doing a certain action required to topple a tree
|
* Checks if a player is doing a certain action required to topple a tree
|
||||||
*
|
*
|
||||||
* @param player The player to check
|
* @param player The player to check
|
||||||
|
*
|
||||||
* @return True if the check passes, otherwise false
|
* @return True if the check passes, otherwise false
|
||||||
*/
|
*/
|
||||||
private boolean checkToppleWhile(Player player) {
|
private boolean checkToppleWhile(Player player) {
|
||||||
@ -192,5 +193,4 @@ public class TreeFallManager extends Manager implements Listener {
|
|||||||
return (short) treeBlocks.getLogBlocks().size();
|
return (short) treeBlocks.getLogBlocks().size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateTimber</artifactId>
|
<artifactId>UltimateTimber</artifactId>
|
||||||
<version>2.2.5</version>
|
<version>2.2.6</version>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user