Skip to content

Commit

Permalink
EliteMobs 9.2.1:
Browse files Browse the repository at this point in the history
- [New] Reenabled the vampire manor wormhole
- [Fix] Fixed startup error related to versioning
- [Fix] Fixed problem related to pre-1.21.4 versions failing to assign some models correctly
- [Fix] Tweaked code for valid spawn location detection for events

Signed-off-by: MagmaGuy <[email protected]>
  • Loading branch information
MagmaGuy committed Dec 21, 2024
1 parent be0e62c commit ff0b448
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ processResources {
}

group 'com.magmaguy'
version '9.2.0'
version '9.2.1'

repositories {
maven {
Expand Down Expand Up @@ -114,7 +114,7 @@ dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'com.magmaguy', name: 'EasyMinecraftGoals-dist', version: '1.15.0'
implementation group: 'com.magmaguy', name: 'MagmaCore', version: '1.5-SNAPSHOT'
implementation group: 'com.magmaguy', name: 'MagmaCore', version: '1.7'

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.magmaguy.elitemobs.entitytracker.EntityTracker;
import com.magmaguy.elitemobs.items.customenchantments.SoulbindEnchantment;
import com.magmaguy.elitemobs.playerdata.ElitePlayerInventory;
import com.magmaguy.elitemobs.versionnotifier.VersionChecker;
import com.magmaguy.magmacore.util.ChatColorConverter;
import com.magmaguy.magmacore.util.ItemStackGenerator;
import com.magmaguy.magmacore.util.Logger;
Expand Down Expand Up @@ -343,7 +344,8 @@ private void dropOneThousand(Location location) {

private ItemStack setCoinModel(ItemStack itemStack, String data) {
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setItemModel(NamespacedKey.fromString(data));
if (!VersionChecker.serverVersionOlderThan(21, 4))
itemMeta.setItemModel(NamespacedKey.fromString(data));
itemStack.setItemMeta(itemMeta);
return itemStack;
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/magmaguy/elitemobs/menus/UnbindMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.magmaguy.elitemobs.items.ItemTagger;
import com.magmaguy.elitemobs.items.customenchantments.SoulbindEnchantment;
import com.magmaguy.elitemobs.items.customenchantments.UnbindEnchantment;
import com.magmaguy.elitemobs.versionnotifier.VersionChecker;
import com.magmaguy.magmacore.util.ItemStackGenerator;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
Expand Down Expand Up @@ -60,7 +61,8 @@ public void constructUnbinderMenu(Player player) {
if (DefaultConfig.isForceMenuUnicode() || Bukkit.getPluginManager().isPluginEnabled("ResourcePackManager")) {
infoButton.setType(Material.PAPER);
ItemMeta itemMeta = infoButton.getItemMeta();
itemMeta.setItemModel(NamespacedKey.fromString("elitemobs:ui/goldenquestionmark"));
if (!VersionChecker.serverVersionOlderThan(21, 4))
itemMeta.setItemModel(NamespacedKey.fromString("elitemobs:ui/goldenquestionmark"));
infoButton.setItemMeta(itemMeta);
}
UnbinderInventory.setItem(i, infoButton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.magmaguy.elitemobs.powers.meta.ElitePower;
import com.magmaguy.elitemobs.thirdparty.custommodels.CustomModel;
import com.magmaguy.elitemobs.thirdparty.libsdisguises.DisguiseEntity;
import com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardCompatibility;
import com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardFlagChecker;
import com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardSpawnEventBypasser;
import com.magmaguy.elitemobs.utils.AttributeManager;
Expand Down Expand Up @@ -74,7 +73,7 @@ public LivingEntity spawn() {
return null;
}
if (EliteMobs.worldGuardIsEnabled) {
if (!WorldGuardFlagChecker.checkFlag(spawnLocation, WorldGuardCompatibility.getELITEMOBS_SPAWN_FLAG())) {
if (!WorldGuardFlagChecker.doEliteMobsSpawnFlag(spawnLocation)) {
Logger.warn("Attempted to spawn " + customBossesConfigFields.getFilename() + " in location " +
spawnLocation + " which is protected by WorldGuard with elitemobs-spawning deny! This should not have happened.");
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: EliteMobs
version: 9.2.0
version: 9.2.1
author: MagmaGuy
main: com.magmaguy.elitemobs.EliteMobs
api-version: 1.14
Expand Down

0 comments on commit ff0b448

Please sign in to comment.