mirror of
https://github.com/nulli0n/ExcellentEnchants-spigot.git
synced 2025-01-30 22:31:23 +01:00
v3.2.7
This commit is contained in:
parent
770b2d0ce1
commit
e2835aee73
2
.gitignore
vendored
2
.gitignore
vendored
@ -13,3 +13,5 @@
|
|||||||
/target/
|
/target/
|
||||||
/V1_18_R2/pom.xml.versionsBackup
|
/V1_18_R2/pom.xml.versionsBackup
|
||||||
/V1_18_R2/target/
|
/V1_18_R2/target/
|
||||||
|
/V1_19_R1/target/
|
||||||
|
/V1_19_R1/pom.xml.versionsBackup
|
||||||
|
10
Core/pom.xml
10
Core/pom.xml
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ExcellentEnchants</artifactId>
|
<artifactId>ExcellentEnchants</artifactId>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@ -36,22 +36,22 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>NMS</artifactId>
|
<artifactId>NMS</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>V1_17_R1</artifactId>
|
<artifactId>V1_17_R1</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>V1_18_R2</artifactId>
|
<artifactId>V1_18_R2</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>V1_19_R1</artifactId>
|
<artifactId>V1_19_R1</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>fr.neatmonster</groupId>
|
<groupId>fr.neatmonster</groupId>
|
||||||
|
@ -5,6 +5,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import su.nexmedia.engine.NexPlugin;
|
import su.nexmedia.engine.NexPlugin;
|
||||||
import su.nexmedia.engine.Version;
|
import su.nexmedia.engine.Version;
|
||||||
import su.nexmedia.engine.api.command.GeneralCommand;
|
import su.nexmedia.engine.api.command.GeneralCommand;
|
||||||
|
import su.nexmedia.engine.command.list.ReloadSubCommand;
|
||||||
import su.nexmedia.engine.utils.Reflex;
|
import su.nexmedia.engine.utils.Reflex;
|
||||||
import su.nightexpress.excellentenchants.command.BookCommand;
|
import su.nightexpress.excellentenchants.command.BookCommand;
|
||||||
import su.nightexpress.excellentenchants.command.EnchantCommand;
|
import su.nightexpress.excellentenchants.command.EnchantCommand;
|
||||||
@ -85,6 +86,7 @@ public class ExcellentEnchants extends NexPlugin<ExcellentEnchants> {
|
|||||||
mainCommand.addChildren(new EnchantCommand(this));
|
mainCommand.addChildren(new EnchantCommand(this));
|
||||||
mainCommand.addChildren(new ListCommand(this));
|
mainCommand.addChildren(new ListCommand(this));
|
||||||
mainCommand.addChildren(new TierbookCommand(this));
|
mainCommand.addChildren(new TierbookCommand(this));
|
||||||
|
mainCommand.addChildren(new ReloadSubCommand<>(this, Perms.PREFIX + "admin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -92,6 +94,11 @@ public class ExcellentEnchants extends NexPlugin<ExcellentEnchants> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerPermissions() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public EnchantManager getEnchantManager() {
|
public EnchantManager getEnchantManager() {
|
||||||
return this.enchantManager;
|
return this.enchantManager;
|
||||||
|
@ -125,7 +125,7 @@ public class EnchantSilkChest extends IEnchantChanceTemplate implements CustomDr
|
|||||||
if (!this.takeCostItem(player)) return;
|
if (!this.takeCostItem(player)) return;
|
||||||
|
|
||||||
// Добавляем в сундук обратно предметы из дроп листа, кроме самого сундука.
|
// Добавляем в сундук обратно предметы из дроп листа, кроме самого сундука.
|
||||||
parent.getItems().removeIf(drop -> drop.getItemStack().getType() == state.getType());
|
parent.getItems().removeIf(drop -> drop.getItemStack().getType() == state.getType() && drop.getItemStack().getAmount() == 1);
|
||||||
chest.getBlockInventory().addItem(parent.getItems().stream().map(Item::getItemStack).toList().toArray(new ItemStack[0]));
|
chest.getBlockInventory().addItem(parent.getItems().stream().map(Item::getItemStack).toList().toArray(new ItemStack[0]));
|
||||||
|
|
||||||
// Добавляем кастомный сундук в кастомный дроп лист.
|
// Добавляем кастомный сундук в кастомный дроп лист.
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.Particle;
|
import org.bukkit.Particle;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.Container;
|
||||||
import org.bukkit.enchantments.EnchantmentTarget;
|
import org.bukkit.enchantments.EnchantmentTarget;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.block.BlockDropItemEvent;
|
import org.bukkit.event.block.BlockDropItemEvent;
|
||||||
@ -90,6 +91,7 @@ public class EnchantSmelter extends IEnchantChanceTemplate implements BlockDropE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean use(@NotNull BlockDropItemEvent e, @NotNull Player player, @NotNull ItemStack item, int level) {
|
public boolean use(@NotNull BlockDropItemEvent e, @NotNull Player player, @NotNull ItemStack item, int level) {
|
||||||
|
if (e.getBlockState() instanceof Container) return false;
|
||||||
if (!this.isEnchantmentAvailable(player)) return false;
|
if (!this.isEnchantmentAvailable(player)) return false;
|
||||||
if (!this.checkTriggerChance(level)) return false;
|
if (!this.checkTriggerChance(level)) return false;
|
||||||
if (e.getItems().stream().noneMatch(drop -> this.isSmeltable(drop.getItemStack().getType()))) return false;
|
if (e.getItems().stream().noneMatch(drop -> this.isSmeltable(drop.getItemStack().getType()))) return false;
|
||||||
|
@ -156,7 +156,7 @@ public class EnchantHandlerListener extends AbstractListener<ExcellentEnchants>
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Prevent to apply enchants multiple times on hits.
|
// Prevent to apply enchants multiple times on hits.
|
||||||
this.removeSourceWeapon(projectile);
|
this.plugin.getScheduler().runTask(this.plugin, c -> this.removeSourceWeapon(projectile));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
@ -101,5 +101,5 @@ Settings:
|
|||||||
# https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
|
# https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
|
||||||
Ignored_Spawn_Reasons:
|
Ignored_Spawn_Reasons:
|
||||||
- SPAWNER
|
- SPAWNER
|
||||||
- SPAWN_EGG
|
- SPAWNER_EGG
|
||||||
- DISPENSE_EGG
|
- DISPENSE_EGG
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ExcellentEnchants</artifactId>
|
<artifactId>ExcellentEnchants</artifactId>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ExcellentEnchants</artifactId>
|
<artifactId>ExcellentEnchants</artifactId>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>NMS</artifactId>
|
<artifactId>NMS</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ExcellentEnchants</artifactId>
|
<artifactId>ExcellentEnchants</artifactId>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>NMS</artifactId>
|
<artifactId>NMS</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ExcellentEnchants</artifactId>
|
<artifactId>ExcellentEnchants</artifactId>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>NMS</artifactId>
|
<artifactId>NMS</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
4
pom.xml
4
pom.xml
@ -7,7 +7,7 @@
|
|||||||
<groupId>su.nightexpress.excellentenchants</groupId>
|
<groupId>su.nightexpress.excellentenchants</groupId>
|
||||||
<artifactId>ExcellentEnchants</artifactId>
|
<artifactId>ExcellentEnchants</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>3.2.6</version>
|
<version>3.2.7</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>Core</module>
|
<module>Core</module>
|
||||||
<module>NMS</module>
|
<module>NMS</module>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>su.nexmedia</groupId>
|
<groupId>su.nexmedia</groupId>
|
||||||
<artifactId>NexEngine</artifactId>
|
<artifactId>NexEngine</artifactId>
|
||||||
<version>2.2.3</version>
|
<version>2.2.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user