mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-23 00:31:20 +01:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # eco-core/build.gradle # gradle.properties
This commit is contained in:
commit
ac63b85e9d
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Auxilor Community Discord
|
||||
url: https://discord.gg/ZcwpSsE/
|
||||
about: Join the Auxilor discord to get help from support staff and the general community!
|
||||
- name: The most common issues people have
|
||||
url: https://github.com/Auxilor/eco/issues/78
|
||||
about: Check the list of known common issues to see if your issue has already been solved
|
31
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Report a Bug
|
||||
about: Report an issue with the plugin
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Server Information (please complete the following information):**
|
||||
- Version: (output of `/ver` command)
|
||||
- Version of plugin and eco (`/ver eco`, `/ver <plugin>`)
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/request-a-feature.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/request-a-feature.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Request a Feature
|
||||
about: Suggest an idea for this plugin
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
@ -3,6 +3,6 @@ version rootProject.version
|
||||
|
||||
subprojects {
|
||||
dependencies {
|
||||
implementation 'com.willfp:libreforge:3.7.1'
|
||||
implementation 'com.willfp:libreforge:3.7.3'
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.eco.util.DurabilityUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -30,6 +31,12 @@ public class Corrosive extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (attacker instanceof Player player) {
|
||||
if (!AntigriefManager.canInjure(player, uncastVictim)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> armor = new ArrayList<>(Arrays.asList(victim.getInventory().getArmorContents()));
|
||||
if (armor.isEmpty()) {
|
||||
return;
|
||||
|
@ -6,19 +6,43 @@ import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Instability extends EcoEnchant {
|
||||
|
||||
private static final List<Entity> toProtect = new ArrayList<>();
|
||||
|
||||
public Instability() {
|
||||
super(
|
||||
"instability", EnchantmentType.SPECIAL
|
||||
);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onInstabilityExplode(@NotNull final EntityDamageEvent event) {
|
||||
if (!toProtect.contains(event.getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getCause() != EntityDamageEvent.DamageCause.ENTITY_EXPLOSION && event.getCause()
|
||||
!= EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
toProtect.remove(event.getEntity());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onInstabilityLand(@NotNull final ProjectileHitEvent event) {
|
||||
if (event.getEntityType() != EntityType.ARROW) {
|
||||
@ -60,6 +84,16 @@ public class Instability extends EcoEnchant {
|
||||
breakblocks = AntigriefManager.canBreakBlock(player, event.getEntity().getLocation().getWorld().getBlockAt(event.getEntity().getLocation()));
|
||||
}
|
||||
|
||||
List<Entity> toAdd = event.getEntity().getNearbyEntities(power, power, power)
|
||||
.stream().filter(entity -> entity instanceof LivingEntity && !AntigriefManager.canInjure(player, (LivingEntity) entity))
|
||||
.toList();
|
||||
|
||||
toProtect.addAll(
|
||||
toAdd
|
||||
);
|
||||
|
||||
this.getPlugin().getScheduler().runLater(() -> toProtect.removeAll(toAdd), 20);
|
||||
|
||||
event.getEntity().getWorld().createExplosion(event.getEntity().getLocation().getX(), event.getEntity().getLocation().getY(), event.getEntity().getLocation().getZ(), power, fire, breakblocks);
|
||||
|
||||
event.getEntity().remove();
|
||||
|
@ -127,6 +127,22 @@ rarity:
|
||||
vanilla-treasure-rarity: legendary # Treasure enchantments do not appear in vanilla enchanting tables (Mending, Soul Speed, Frost Walker)
|
||||
# The above options *do not* affect actual enchantment rarities. They are purely for cosmetic purposes, like in item lores.
|
||||
|
||||
use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements
|
||||
|
||||
cooldown: # For custom enchantments
|
||||
in-actionbar: true
|
||||
sound:
|
||||
enabled: true
|
||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
||||
pitch: 0.5
|
||||
|
||||
cannot-afford: # For custom enchantments
|
||||
in-actionbar: true
|
||||
sound:
|
||||
enabled: true
|
||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
||||
pitch: 0.5
|
||||
|
||||
advanced:
|
||||
force-dropqueue: true
|
||||
# When combined with collate, this massively reduces calls to getItemMeta, which can hurt performance when many enchants are on an item.
|
||||
|
@ -1,2 +1,2 @@
|
||||
version = 8.29.1
|
||||
version = 8.29.4
|
||||
plugin-name = EcoEnchants
|
Loading…
Reference in New Issue
Block a user