diff --git a/docs/changelog_v3.3.x.md b/docs/changelog_v3.3.x.md index a15e4fe74..ea67ac6aa 100644 --- a/docs/changelog_v3.3.x.md +++ b/docs/changelog_v3.3.x.md @@ -17,6 +17,9 @@ These change logs represent the work that has been going on within prison. # 3.3.0-alpha.18b 2024-07-07 +* **Mine bombs: Update and fix some issues with the new mine bomb processing and animations.** + + * **Prison NBT: removed debug code which was generating a lot of entries in the logs.** diff --git a/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationInfinity.java b/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationInfinity.java index 2e3866979..ea40ebd4f 100644 --- a/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationInfinity.java +++ b/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationInfinity.java @@ -1,153 +1,36 @@ package tech.mcprison.prison.bombs.animations; import tech.mcprison.prison.bombs.MineBombData; -import tech.mcprison.prison.bombs.MineBombs; -import tech.mcprison.prison.internal.ArmorStand; import tech.mcprison.prison.internal.EulerAngle; import tech.mcprison.prison.internal.ItemStack; import tech.mcprison.prison.internal.block.PrisonBlock; -import tech.mcprison.prison.output.Output; -import tech.mcprison.prison.util.BluesSemanticVersionComparator; -import tech.mcprison.prison.util.Location; public class BombAnimationInfinity extends BombAnimations { - - private double eulerAngleX = 1.0; - private double eulerAngleY = 0; - private double eulerAngleZ = 0; - - private double twoPI; - - private ArmorStand armorStand; - - private float entityYaw; - private float entityPitch; - - - - public BombAnimationInfinity( MineBombData bomb, PrisonBlock sBombBlock, ItemStack item, BombAnimationsTask task, float entityYaw, float entityPitch ) { - super( bomb, sBombBlock, item, task ); + super( bomb, sBombBlock, item, task, entityYaw, entityPitch ); - this.entityYaw = entityYaw; - this.entityPitch = entityPitch; - - initialize(); } - - public void initialize() { - - this.twoPI = Math.PI * 2; - - - initializeArmorStand(); - } - - private void initializeArmorStand() { - - Location location = getsBlock().getLocation(); - location.setY( location.getY() + 2.5 ); - - location.setYaw( entityYaw ); - location.setPitch( entityPitch + 90 ); - - - double startingAngle = ( 360d / entityYaw ) * twoPI; - -// eulerAngleX += startingAngle; - - EulerAngle arm = new EulerAngle( eulerAngleX + startingAngle, eulerAngleY + startingAngle, eulerAngleZ + startingAngle ); - - - armorStand = location.spawnArmorStand(); - - armorStand.setNbtString( MineBombs.MINE_BOMBS_NBT_KEY, getBomb().getName() ); - - if ( armorStand != null ) { - - armorStand.setVisible(false); - armorStand.setRemoveWhenFarAway(false); - armorStand.setItemInHand( getItem() ); - armorStand.setRightArmPose(arm); - - - if ( initializeCustomName() && getId() == 1 ) { - - //updateArmorStandCustomName(); - armorStand.setCustomName( getTagName() ); - armorStand.setCustomNameVisible(true); - } - else { - - armorStand.setCustomNameVisible(false); - } - - if ( new BluesSemanticVersionComparator().compareMCVersionTo( "1.9.0" ) >= 0 ) { - - armorStand.setGlowing( getBomb().isGlowing() ); - - // setGravity is invalid for spigot 1.8.8: - armorStand.setGravity( getBomb().isGravity() ); - } - } - - if ( Output.get().isDebug() ) { - String msg = String.format( - "### BombAnimationInfinity.initializeArmorStand : id: %s ", - Integer.toString(getId()) - - ); - Output.get().logInfo( msg ); - } - } - - - - @Override - public void step() + public void stepAnimation() { - + double speed = 0.35; - eulerAngleX += speed; - eulerAngleY += speed / 3; - eulerAngleZ += speed / 5; - - - EulerAngle arm = new EulerAngle( eulerAngleX, eulerAngleY, eulerAngleZ ); - - armorStand.setRightArmPose(arm); + setEulerAngleX( getEulerAngleX() + speed ); + setEulerAngleY( getEulerAngleY() + speed / 3); + setEulerAngleZ( getEulerAngleZ() + speed / 5 ); - if ( eulerAngleX > twoPI ) { - eulerAngleX -= twoPI; - } - if ( eulerAngleY > twoPI ) { - eulerAngleY -= twoPI; - } - if ( eulerAngleZ > twoPI ) { - eulerAngleZ -= twoPI; - } - - - // Track the time that this has lived: - if ( --terminateOnZeroTicks == 0 || !armorStand.isValid() ) { - - armorStand.remove(); - - cancel(); - } - - updateCustomName(); + EulerAngle arm = new EulerAngle( getEulerAngleX(), getEulerAngleY(), getEulerAngleZ() ); + getArmorStand().setRightArmPose(arm); } } diff --git a/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationNone.java b/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationNone.java index f26e13251..f8adbe0a2 100644 --- a/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationNone.java +++ b/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimationNone.java @@ -1,109 +1,25 @@ package tech.mcprison.prison.bombs.animations; import tech.mcprison.prison.bombs.MineBombData; -import tech.mcprison.prison.bombs.MineBombs; -import tech.mcprison.prison.internal.ArmorStand; import tech.mcprison.prison.internal.ItemStack; import tech.mcprison.prison.internal.block.PrisonBlock; -import tech.mcprison.prison.output.Output; -import tech.mcprison.prison.util.BluesSemanticVersionComparator; -import tech.mcprison.prison.util.Location; public class BombAnimationNone extends BombAnimations { - private ArmorStand armorStand; - - private float entityYaw; - private float entityPitch; - - public BombAnimationNone( MineBombData bomb, PrisonBlock sBombBlock, ItemStack item, BombAnimationsTask task, float entityYaw, float entityPitch ) { - super( bomb, sBombBlock, item, task ); + super( bomb, sBombBlock, item, task, entityYaw, entityPitch ); - this.entityYaw = entityYaw; - this.entityPitch = entityPitch; - - initialize(); } - public void initialize() { - - initializeArmorStand(); - } - - private void initializeArmorStand() { - - Location location = getsBlock().getLocation(); - location.setY( location.getY() + 2.5 ); - - location.setYaw( entityYaw ); - location.setPitch( entityPitch + 90 ); - - - armorStand = location.spawnArmorStand(); - - armorStand.setNbtString( MineBombs.MINE_BOMBS_NBT_KEY, getBomb().getName() ); - - if ( armorStand != null ) { - - armorStand.setVisible(false); - armorStand.setRemoveWhenFarAway(false); - armorStand.setItemInHand( getItem() ); - //armorStand.setRightArmPose(arm); - - - if ( initializeCustomName() ) { - - //updateArmorStandCustomName(); - armorStand.setCustomName( getTagName() ); - armorStand.setCustomNameVisible(true); - } - else { - - armorStand.setCustomNameVisible(false); - } - - if ( new BluesSemanticVersionComparator().compareMCVersionTo( "1.9.0" ) >= 0 ) { - - armorStand.setGlowing( getBomb().isGlowing() ); - - // setGravity is invalid for spigot 1.8.8: - armorStand.setGravity( getBomb().isGravity() ); - } - } - - if ( Output.get().isDebug() ) { - String msg = String.format( - "### BombAnimationInfinity.initializeArmorStand : id: %s ", - Integer.toString(getId()) - - ); - Output.get().logInfo( msg ); - } - } - - - @Override - public void step() + public void stepAnimation() { - - // Track the time that this has lived: - if ( --terminateOnZeroTicks == 0 || !armorStand.isValid() ) { - - armorStand.remove(); - - cancel(); - } - - updateCustomName(); } - } diff --git a/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimations.java b/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimations.java index 471690d64..485b26e20 100644 --- a/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimations.java +++ b/prison-core/src/main/java/tech/mcprison/prison/bombs/animations/BombAnimations.java @@ -4,8 +4,14 @@ import tech.mcprison.prison.Prison; import tech.mcprison.prison.bombs.MineBombData; +import tech.mcprison.prison.bombs.MineBombs; +import tech.mcprison.prison.internal.ArmorStand; +import tech.mcprison.prison.internal.EulerAngle; import tech.mcprison.prison.internal.ItemStack; import tech.mcprison.prison.internal.block.PrisonBlock; +import tech.mcprison.prison.output.Output; +import tech.mcprison.prison.util.BluesSemanticVersionComparator; +import tech.mcprison.prison.util.Location; import tech.mcprison.prison.util.Text; public abstract class BombAnimations { @@ -18,20 +24,33 @@ public abstract class BombAnimations { private PrisonBlock sBlock; private ItemStack item; - + private String customName; private boolean isDyanmicTag = false; private String tagName; // long ageTicks = 0L; long terminateOnZeroTicks = 0L; + private ArmorStand armorStand; + + private double eulerAngleX = 1.0; + private double eulerAngleY = 0; + private double eulerAngleZ = 0; + + private double twoPI; + + private float entityYaw; + private float entityPitch; + private DecimalFormat dFmt; public BombAnimations( MineBombData bomb, PrisonBlock sBombBlock, ItemStack item, - BombAnimationsTask task ) { + BombAnimationsTask task, + float entityYaw, + float entityPitch ) { super(); // Used for "canceling" and detonating the task: @@ -46,22 +65,117 @@ public BombAnimations( MineBombData bomb, // this.ageTicks = 0; this.terminateOnZeroTicks = getTaskLifeSpan(); - this.isDyanmicTag = bomb.getNameTag().contains( "{countdown}" ); + this.isDyanmicTag = bomb.getNameTag() != null && + bomb.getNameTag().contains( "{countdown}" ); this.tagName = ""; - this.dFmt = Prison.get().getDecimalFormat( "0.0" ); + + this.entityYaw = entityYaw; + this.entityPitch = entityPitch; + + this.twoPI = Math.PI * 2; - // initialize(); + this.dFmt = Prison.get().getDecimalFormat( "0.0" ); + + initialize(); } protected void cancel() { task.cancel(); } - public abstract void initialize(); - + public void initialize() { + + Location location = getsBlock().getLocation(); + location.setY( location.getY() + 3 ); + + location.setYaw( entityYaw ); + location.setPitch( entityPitch + 90 ); + + + double startingAngle = ( 360d / entityYaw ) * twoPI; + + // eulerAngleX += startingAngle; + + EulerAngle arm = new EulerAngle( + eulerAngleX + startingAngle, + eulerAngleY + startingAngle, + eulerAngleZ + startingAngle ); + + + armorStand = location.spawnArmorStand(); + + if ( armorStand != null ) { + + armorStand.setVisible(false); + + armorStand.setNbtString( MineBombs.MINE_BOMBS_NBT_KEY, getBomb().getName() ); + + armorStand.setRightArmPose(arm); + armorStand.setItemInHand( getItem() ); + + armorStand.setCustomNameVisible( getId() == 0 && initializeCustomName() ); + armorStand.setRemoveWhenFarAway(false); + + if ( new BluesSemanticVersionComparator().compareMCVersionTo( "1.9.0" ) >= 0 ) { + + armorStand.setGlowing( getBomb().isGlowing() ); + + // setGravity is invalid for spigot 1.8.8: + armorStand.setGravity( getBomb().isGravity() ); + } + } + + if ( Output.get().isDebug() ) { + String msg = String.format( + "### BombAnimation.initializeArmorStand : id: %s %s ", + Integer.toString(getId()), + bomb.getAnimationPattern().name() + ); + + Output.get().logInfo( msg ); + } + } + + + public abstract void stepAnimation(); - public abstract void step(); + public void step() { + stepAnimation(); + + if ( eulerAngleX > twoPI ) { + eulerAngleX -= twoPI; + } + else if ( eulerAngleX < -twoPI ) { + eulerAngleX += twoPI; + } + if ( eulerAngleY > twoPI ) { + eulerAngleY -= twoPI; + } + else if ( eulerAngleY < -twoPI ) { + eulerAngleY += twoPI; + } + if ( eulerAngleZ > twoPI ) { + eulerAngleZ -= twoPI; + } + else if ( eulerAngleZ < -twoPI ) { + eulerAngleZ += twoPI; + } + + // Track the time that this has lived: + if ( --terminateOnZeroTicks == 0 || !armorStand.isValid() ) { + + armorStand.remove(); + + cancel(); + } + + if ( getId() == 0 ) { + + updateCustomName(); + } + + } /** @@ -93,16 +207,34 @@ protected long getTaskLifeSpan() protected boolean initializeCustomName() { boolean results = false; - if ( getBomb().getNameTag() != null && - !getBomb().getNameTag().trim().isEmpty() ) { + String tName = null; + + if ( getBomb().getNameTag() == null || + getBomb().getNameTag().trim().isEmpty() ) { + + tName = getBomb().getName(); + } + else { - String tagName = getBomb().getNameTag(); - if ( tagName.contains( "{name}" ) ) { - tagName = tagName.replace( "{name}", getBomb().getName() ); + tName = getBomb().getNameTag(); + if ( tName.contains( "{name}" ) ) { + tName = tName.replace( "{name}", getBomb().getName() ); } - setTagName( Text.translateAmpColorCodes( tagName ) ); } + + if ( tName != null ) { + + tName = Text.translateAmpColorCodes( tName ); + + setTagName( tName ); + setCustomName( tName ); + armorStand.setCustomName( tName ); + + updateCustomName(); + results = true; + } + return results; } @@ -111,9 +243,13 @@ protected void updateCustomName() if ( isDyanmicTag ) { double countdown = (terminateOnZeroTicks / 20.0d); - String tagName = this.tagName.replace( "{countdown}", dFmt.format( countdown) ); + String cName = getTagName().replace( "{countdown}", dFmt.format( countdown) ); - setTagName( tagName ); + setCustomName( cName ); + + armorStand.setCustomName( cName ); + +// setTagName( tagName ); // armorStand.setCustomName( tagName ); } } @@ -160,6 +296,13 @@ public void setDyanmicTag(boolean isDyanmicTag) { this.isDyanmicTag = isDyanmicTag; } + public String getCustomName() { + return customName; + } + public void setCustomName(String customName) { + this.customName = customName; + } + public String getTagName() { return tagName; } @@ -173,5 +316,54 @@ public long getTerminateOnZeroTicks() { public void setTerminateOnZeroTicks(long terminateOnZeroTicks) { this.terminateOnZeroTicks = terminateOnZeroTicks; } + + public ArmorStand getArmorStand() { + return armorStand; + } + public void setArmorStand(ArmorStand armorStand) { + this.armorStand = armorStand; + } + + public double getEulerAngleX() { + return eulerAngleX; + } + public void setEulerAngleX(double eulerAngleX) { + this.eulerAngleX = eulerAngleX; + } + + public double getEulerAngleY() { + return eulerAngleY; + } + public void setEulerAngleY(double eulerAngleY) { + this.eulerAngleY = eulerAngleY; + } + + public double getEulerAngleZ() { + return eulerAngleZ; + } + public void setEulerAngleZ(double eulerAngleZ) { + this.eulerAngleZ = eulerAngleZ; + } + + public double getTwoPI() { + return twoPI; + } + public void setTwoPI(double twoPI) { + this.twoPI = twoPI; + } + + public float getEntityYaw() { + return entityYaw; + } + public void setEntityYaw(float entityYaw) { + this.entityYaw = entityYaw; + } + + public float getEntityPitch() { + return entityPitch; + } + public void setEntityPitch(float entityPitch) { + this.entityPitch = entityPitch; + } } diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/SpigotUtil.java b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/SpigotUtil.java index 6295fc029..66f567c23 100644 --- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/SpigotUtil.java +++ b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/SpigotUtil.java @@ -1045,9 +1045,16 @@ public static Location bukkitLocationToPrison(org.bukkit.Location bukkitLocation } public static org.bukkit.Location prisonLocationToBukkit(Location prisonLocation) { - return new org.bukkit.Location(Bukkit.getWorld(prisonLocation.getWorld().getName()), - prisonLocation.getX(), prisonLocation.getY(), prisonLocation.getZ(), - prisonLocation.getYaw(), prisonLocation.getPitch()); + org.bukkit.Location loc = new org.bukkit.Location( + Bukkit.getWorld(prisonLocation.getWorld().getName()), + prisonLocation.getX(), prisonLocation.getY(), prisonLocation.getZ(), + prisonLocation.getYaw(), prisonLocation.getPitch() ); + + Vector v = prisonLocation.getDirection(); + org.bukkit.util.Vector vec = new org.bukkit.util.Vector( v.getX(), v.getY(), v.getZ() ); + loc.setDirection( vec ); + + return loc; } /* @@ -1055,7 +1062,7 @@ public static org.bukkit.Location prisonLocationToBukkit(Location prisonLocation */ public static SpigotItemStack bukkitItemStackToPrison( ItemStack bukkitStack) { -; SpigotItemStack results = null; + SpigotItemStack results = null; if ( bukkitStack != null ) { try { diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/game/entity/SpigotArmorStand.java b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/game/entity/SpigotArmorStand.java index cb651f52d..8c4d94196 100644 --- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/game/entity/SpigotArmorStand.java +++ b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/game/entity/SpigotArmorStand.java @@ -43,8 +43,19 @@ public boolean isVisible() { } @Override - public void setVisible(boolean visible) { - bArmorStand.setVisible(visible); + public void setVisible( boolean visible ) { + bArmorStand.setVisible( visible ); + } + + @Override + public void setCustomNameVisible( boolean visible ) { + bArmorStand.setCustomNameVisible( visible ); + } + + @Override + public void setCustomName( String customName ) { + + bArmorStand.setCustomName( customName ); } @Override diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonBombListener.java b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonBombListener.java index 0da5410c8..9ee9d0a43 100644 --- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonBombListener.java +++ b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonBombListener.java @@ -131,6 +131,8 @@ public void mineBombThrowEvent( PlayerInteractEvent event ) { if ( bombName != null ) { + // We do not know if the bomb will be in a mine, but we know + // it's a mine bomb so no other listener should handle it. event.setCancelled( true ); MineBombData mineBomb = MineBombs.getInstance().findBombByName(bombName); @@ -175,6 +177,8 @@ public void mineBombThrowEvent( PlayerInteractEvent event ) { armorStand.setRemoveWhenFarAway(false); + + // Remove the unused armorStand in 120 seconds: final int taskId = SpigotPrison.getInstance().getScheduler() .runTaskLater( @@ -411,7 +415,9 @@ public void run() { /** - *

This function will initiate the placement of a mine bomb. + *

This function will initiate the placement of a mine bomb. + * This handles the right-clicking on a block. This will not + * throw it. *

* @param event */ @@ -425,9 +431,8 @@ public void bombPlacementEvent( PlayerInteractEvent event ) { ItemStack iStack = event.getItem(); - if ( iStack != null && (event.getAction().equals(Action.RIGHT_CLICK_BLOCK) || - event.getAction().equals(Action.RIGHT_CLICK_AIR)) && - event.getItem() != null && event.getItem().getType() != Material.AIR ) { + if ( iStack != null && iStack.getType() != Material.AIR && + event.getAction().equals(Action.RIGHT_CLICK_BLOCK) ) { // If the player is holding a mine bomb, then get the bomb and decrease the // ItemStack in the player's hand by 1: @@ -531,6 +536,16 @@ private boolean processBombTriggerEvent( SpigotPlayer sPlayer, boolean canceled = false; + if ( getPrisonUtilsMineBombs().setBombInHand( sPlayer, mineBomb, sBlock, hand ) ) { + + // The item was a bomb and it was activated. + // Cancel the event so the item will not be placed or processed farther. + +// Output.get().logInfo( "### PrisonBombListener: PlayerInteractEvent 03 Bomb detected - May not have been set. " ); + canceled = true; + } + + // // Temp test stuff... remove when NBTs are working: // { @@ -581,27 +596,27 @@ private boolean processBombTriggerEvent( SpigotPlayer sPlayer, // Mine mine = getMine(sPlayer, mineBomb, sBlock ); - if ( mine == null ) { - canceled = true; - } - else { - - - // getHand() is not available with bukkit 1.8.8 so use the compatibility functions: -// EquipmentSlot hand = SpigotCompatibility.getInstance().getHand(event); -// EquipmentSlot hand = event.getHand(); - -// Output.get().logInfo( "### PrisonBombListener: PlayerInteractEvent 02 " ); - if ( getPrisonUtilsMineBombs().setBombInHand( sPlayer, mineBomb, sBlock, hand ) ) { - - // The item was a bomb and it was activated. - // Cancel the event so the item will not be placed or processed farther. - -// Output.get().logInfo( "### PrisonBombListener: PlayerInteractEvent 03 Bomb detected - May not have been set. " ); - canceled = true; -// event.setCancelled( true ); - } - } +// if ( mine == null ) { +// canceled = false; +// } +// else { +// +// +// // getHand() is not available with bukkit 1.8.8 so use the compatibility functions: +//// EquipmentSlot hand = SpigotCompatibility.getInstance().getHand(event); +//// EquipmentSlot hand = event.getHand(); +// +//// Output.get().logInfo( "### PrisonBombListener: PlayerInteractEvent 02 " ); +// if ( getPrisonUtilsMineBombs().setBombInHand( sPlayer, mineBomb, sBlock, hand ) ) { +// +// // The item was a bomb and it was activated. +// // Cancel the event so the item will not be placed or processed farther. +// +//// Output.get().logInfo( "### PrisonBombListener: PlayerInteractEvent 03 Bomb detected - May not have been set. " ); +// canceled = true; +//// event.setCancelled( true ); +// } +// } return canceled; } @@ -628,7 +643,9 @@ private Mine getMine(SpigotPlayer sPlayer, MineBombData mineBomb, SpigotBlock sB // player is not in a mine, so do not allow them to trigger a mine bomb: if ( Output.get().isDebug() ) { - Output.get().logInfo( "MineBombs: Cannot use mine bombs use outside of mines." ); + String msg = "MineBombs: Cannot use mine bombs use outside of mines."; + sPlayer.setActionBar( msg ); +// Output.get().logInfo( msg ); } } @@ -636,8 +653,11 @@ else if ( !mine.hasMiningAccess( sPlayer ) ) { // Player does not have access to the mine, so don't allow them to trigger a mine bomb: if ( Output.get().isDebug() ) { - Output.get().logInfo( "MineBombs: Player %s&r does not have access to Mine %s&r.", - sPlayer.getName(), mine.getName()); + String msg = String.format( + "MineBombs: %s&r, you do not have access to mine %s&r.", + sPlayer.getName(), mine.getName() ); + sPlayer.setActionBar( msg ); +// Output.get().logInfo( msg ); } mine = null; @@ -657,11 +677,13 @@ else if ( !mine.hasMiningAccess( sPlayer ) ) { // Mine bombs are not allowed to be used in this mine so cancel: - sPlayer.sendMessage( String.format( - "&3You cannot use that bomb in this mine. mine: &7%s &3bomb: &7%s&r", - mine.getTag(), - mineBomb.getNameTag() - ) ); + String msg = String.format( + "&3You cannot use the &7%s &3bomb in mine &7%s.&r", + mineBomb.getNameTag(), + mine.getTag() + ); + sPlayer.setActionBar( msg ); +// sPlayer.sendMessage( msg ); mine = null; } diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonUtilsMineBombs.java b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonUtilsMineBombs.java index 022f1c804..5fd94f521 100644 --- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonUtilsMineBombs.java +++ b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/utils/PrisonUtilsMineBombs.java @@ -263,9 +263,9 @@ else if ( removeAll || + "&3usedBy: &a%s ", iFmt.format( bounds.getDistance3d() ), id, - iFmt.format( l.getBlockX() ), - iFmt.format( l.getBlockY() ), - iFmt.format( l.getBlockZ() ), + dFmt.format( l.getX() ), + dFmt.format( l.getY() ), + dFmt.format( l.getZ() ), dFmt.format( times ), // age sfx, status, @@ -986,7 +986,9 @@ public ItemStack getItemStackBomb( MineBombData bombData, SpigotPlayer player ) if ( Output.get().isDebug() ) { - Output.get().logInfo( "getItemStackBombs ntb: %s", PrisonNBTUtil.nbtDebugString(sItemStack) ); + Output.get().logInfo( "getItemStackBombs ntb: %s", + Text.translateAmpColorCodes( PrisonNBTUtil.nbtDebugString(sItemStack) ) + ); } }