Allow knockback to be set to 0, for the rare person that might for whatever reason want to disable border knockback
This commit is contained in:
parent
9fd230a218
commit
470b19160d
|
@ -134,6 +134,10 @@ public class BorderData
|
|||
|
||||
public Location correctedPosition(Location loc, boolean round)
|
||||
{
|
||||
// if knockback is set to 0, simply return
|
||||
if (Config.KnockBack() == 0.0)
|
||||
return loc;
|
||||
|
||||
// if this border has a shape override set, use it
|
||||
if (shapeRound != null)
|
||||
round = shapeRound.booleanValue();
|
||||
|
|
|
@ -354,13 +354,13 @@ public class WBCommand implements CommandExecutor
|
|||
}
|
||||
catch(NumberFormatException ex)
|
||||
{
|
||||
sender.sendMessage(clrErr + "The knockback must be a decimal value of at least 1.0.");
|
||||
sender.sendMessage(clrErr + "The knockback must be a decimal value of at least 1.0, or it can be 0.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (numBlocks < 1.0)
|
||||
if (numBlocks < 0.0 || (numBlocks > 0.0 && numBlocks < 1.0))
|
||||
{
|
||||
sender.sendMessage(clrErr + "The knockback must be a decimal value of at least 1.0.");
|
||||
sender.sendMessage(clrErr + "The knockback must be a decimal value of at least 1.0, or it can be 0.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue