Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.1.8 #74

Merged
merged 9 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B package --file pom.xml -Pgithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn clean install --file pom.xml
run: mvn clean install --file pom.xml -Pgithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
Expand Down
18 changes: 16 additions & 2 deletions .idea/dbnavigator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion RelluBash-Script-Collection
40 changes: 31 additions & 9 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>de.relluem94</groupId>
<artifactId>relluessentials</artifactId>
<name>RelluEssentials</name>
<version>4.1.6</version>
<version>4.1.8</version>
<url>https://github.com/Relluem94s/RelluEssentials</url>
<scm>
<connection>scm:git:[email protected]:Relluem94s/RelluEssentials.git</connection>
Expand Down Expand Up @@ -51,10 +51,9 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.MF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/**</exclude>
<exclude>LICENSE</exclude>
<exclude>module-info.class</exclude>
</excludes>
</filter>
</filters>
Expand All @@ -72,11 +71,27 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<releases />
<snapshots />
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<releases />
<snapshots />
<id>github</id>
<name>RelluLib</name>
<url>https://maven.pkg.github.com/Relluem94s/RelluLib</url>
</repository>
</repositories>
</profile>
</profiles>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>central</id>
<name>central</name>
Expand All @@ -90,6 +105,13 @@
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<releases />
<snapshots />
<id>github</id>
<name>RelluLib</name>
<url>https://maven.pkg.github.com/Relluem94s/RelluLib</url>
</repository>
</repositories>
<dependencies>
<dependency>
Expand Down
52 changes: 34 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>de.relluem94</groupId>
<artifactId>relluessentials</artifactId>
<name>RelluEssentials</name>
<version>4.1.7</version>
<version>4.1.8</version>
<url>https://github.com/Relluem94s/RelluEssentials</url>
<properties>
<lombok.version>1.18.30</lombok.version>
Expand All @@ -29,10 +29,6 @@
<url>https://github.com/Relluem94s/RelluEssentials</url>
</scm>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>central</id>
<name>central</name>
Expand All @@ -46,7 +42,34 @@
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>github</id>
<name>RelluLib</name>
<url>https://maven.pkg.github.com/Relluem94s/RelluLib</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github</id>
<name>RelluLib</name>
<url>https://maven.pkg.github.com/Relluem94s/RelluLib</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
Expand All @@ -55,9 +78,9 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.Relluem94s</groupId>
<artifactId>RelluLib</artifactId>
<version>0.12</version>
<groupId>de.relluem94</groupId>
<artifactId>rellulib</artifactId>
<version>0.16</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -76,11 +99,6 @@
<artifactId>authlib</artifactId>
<version>4.0.43</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.1.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -98,7 +116,6 @@
<version>1.10.1</version>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<resources>
Expand Down Expand Up @@ -141,10 +158,9 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.MF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/**</exclude>
<exclude>LICENSE</exclude>
<exclude>module-info.class</exclude>
</excludes>
</filter>
</filters>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ public void onBlockBreak(BlockBreakEvent e){
if(EnchantmentHelper.hasEnchant(p.getInventory().getItemInMainHand(), CustomEnchants.telekinesis)){
int dropCount = 0;

if(isChorusPlant(b)){
if(isChorusPlant(b) && b.getRelative(BlockFace.DOWN).getType().equals(Material.END_STONE)){

List<Block> blocks = new ArrayList<>(getChorusBlocks(b, 0, null));

if(blocks.size() <= 50){
e.setCancelled(true);
blocks.forEach(block -> block.setType(Material.AIR));
b.setType(Material.AIR);

Item item = e.getBlock().getWorld().dropItem(e.getBlock().getLocation(), new ItemStack(Material.CHORUS_FRUIT, blocks.size()+1));
EntityPickupItemEvent entityPickupItemEvent = new EntityPickupItemEvent(p, item, blocks.size()+1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
Expand All @@ -20,14 +21,20 @@
import de.relluem94.minecraft.server.spigot.essentials.helpers.BagHelper;
import de.relluem94.minecraft.server.spigot.essentials.helpers.EnchantmentHelper;
import de.relluem94.minecraft.server.spigot.essentials.helpers.pojo.PlayerEntry;
import org.bukkit.scheduler.BukkitRunnable;

/* Better Call Soil */
public class BetterSoil implements Listener {

@EventHandler
public void onChange(PlayerInteractEvent e) {
Block b = e.getClickedBlock();

if(b == null){
return;
}

if (e.getAction() == Action.PHYSICAL) {
Block b = e.getClickedBlock();
if (b.getType().equals(Material.FARMLAND) && (!e.getPlayer().isSneaking())) {
e.setUseInteractedBlock(Event.Result.DENY);
e.setCancelled(true);
Expand All @@ -36,11 +43,9 @@ public void onChange(PlayerInteractEvent e) {
else{
if(CustomItems.magic_water_bucket.almostEquals(e.getPlayer().getInventory().getItemInMainHand())){
e.setCancelled(true);
if(e.getClickedBlock() != null){
Block b = e.getClickedBlock().getRelative(e.getBlockFace());
if(b.getType().equals(Material.AIR)){
b.setType(Material.WATER, false);
}
b = e.getClickedBlock().getRelative(e.getBlockFace());
if(b.getType().equals(Material.AIR)){
b.setType(Material.WATER);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ private void patch7() {
executeScript(v + UPDATE_OLD_PLUGIN_INFORMATION);
}

private void patch8() {
String v = "patches/v8/";

executeScript(v + "insertProtectionLocks.sql");

executeScript(v + INSERT_NEW_DB_VERSION);
executeScript(v + UPDATE_OLD_PLUGIN_INFORMATION);
}

public void init() {
applyPatch(getPluginInformation().getDbVersion());
}
Expand All @@ -286,6 +295,7 @@ private void applyPatch(int version) {
patch5();
patch6();
patch7();
patch8();
break;
case 1:
patch2();
Expand All @@ -294,31 +304,40 @@ private void applyPatch(int version) {
patch5();
patch6();
patch7();
patch8();
break;
case 2:
patch3();
patch4();
patch5();
patch6();
patch7();
patch8();
break;
case 3:
patch4();
patch5();
patch6();
patch7();
patch8();
break;
case 4:
patch5();
patch6();
patch7();
patch8();
break;
case 5:
patch6();
patch7();
patch8();
break;
case 6:
patch7();
patch8();
break;
case 7:
patch8();
break;
default:
// To add Scripts in Development without its own patch version
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/sqls/patches/v8/insertNewDBVersion.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Author: rellu
* Created: 19.02.2023
*/

INSERT INTO `plugin_informations` (`CREATED`, `CREATEDBY`, `tab_header`, `tab_footer`, `motd_message`, `motd_players`, `db_version`) SELECT now(), 1, tab_header, tab_footer, motd_message, motd_players, 8 FROM `plugin_informations` where deletedby is null;
Loading
Loading