many fixes
This commit is contained in:
parent
a21d43e58f
commit
ef1d6ede24
@ -23,13 +23,13 @@ public class ClansBanCommand extends CommandBase<ClansBanManager>
|
|||||||
{
|
{
|
||||||
UtilPlayer.message(caller, C.cGold + "/cb <username> <reason> - Displays the \"Clans Punish\" GUI, allowing you to ban the player, and ");
|
UtilPlayer.message(caller, C.cGold + "/cb <username> <reason> - Displays the \"Clans Punish\" GUI, allowing you to ban the player, and ");
|
||||||
}
|
}
|
||||||
else if (args.length > 2)
|
else if (args.length > 1)
|
||||||
{
|
{
|
||||||
final String playerName = args[0];
|
final String playerName = args[0];
|
||||||
|
|
||||||
String reason = args[2];
|
String reason = args[2];
|
||||||
|
|
||||||
for (int i = 3; i < args.length; i++)
|
for (int i = 2; i < args.length; i++)
|
||||||
{
|
{
|
||||||
reason += " " + args[i];
|
reason += " " + args[i];
|
||||||
}
|
}
|
||||||
@ -62,8 +62,7 @@ public class ClansBanCommand extends CommandBase<ClansBanManager>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, C.cGold + "/cb <username> <timeInDays(number)/p(ermanent)> <description> - Bans the specified player for the specified amount of time");
|
UtilPlayer.message(caller, C.cGold + "/cb <username> <reason> - Displays the \"Clans Punish\" GUI, allowing you to ban the player, and ");
|
||||||
UtilPlayer.message(caller, C.cGold + "/cb <username> - Displays the \"Clans Punish\" UI, and will display all of the player's past bans (including current ones)");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package mineplex.game.clans.clans.ban.ui;
|
package mineplex.game.clans.clans.ban.ui;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
@ -116,9 +117,16 @@ public class ClansBanPage extends ShopPageBase<ClansBanManager, ClansBanShop>
|
|||||||
.addLore("Reason: " + F.elem(data.getRight())).build(),
|
.addLore("Reason: " + F.elem(data.getRight())).build(),
|
||||||
(player, click) -> {
|
(player, click) -> {
|
||||||
getPlugin().runAsync(() -> {
|
getPlugin().runAsync(() -> {
|
||||||
double time = _days + ((1 / 24) * _hours);
|
double time = _days + ((1.f / 24.f) * _hours);
|
||||||
getPlugin().ban(client, data.getLeft(), getPlayer().getName(), _permanent ? -1 : (long) (time * 24.f * 60.f * 60.f * 1000.f), data.getRight(), c -> {
|
getPlugin().ban(client, data.getLeft(), getPlayer().getName(), _permanent ? -1 : (long) (time * 24.f * 60.f * 60.f * 1000.f), data.getRight(), c -> {
|
||||||
UtilPlayer.message(getPlayer(), F.main("Clans", F.elem(data.getLeft()) + " is now banned " + c.getBanTimeFormatted() + "."));
|
UtilPlayer.message(getPlayer(), F.main("Clans", F.elem(data.getLeft()) + " is now banned " + c.getBanTimeFormatted() + "."));
|
||||||
|
|
||||||
|
getPlugin().runSync(() -> {
|
||||||
|
Player target = Bukkit.getPlayer(data.getLeft());
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
target.kickPlayer(C.cRedB + "You have been banned from Clans " + c.getBanTimeFormatted() + ".");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -12,7 +12,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
|||||||
|
|
||||||
public class HyperAxe extends LegendaryItem
|
public class HyperAxe extends LegendaryItem
|
||||||
{
|
{
|
||||||
public static final long ATTACK_RATE_DURATION = 1000 / 17;
|
public static final long ATTACK_RATE_DURATION = 1000 / 10;
|
||||||
private static ValueDistribution amountGen = generateDistribution(0, 3); // [1, 4] speed amount
|
private static ValueDistribution amountGen = generateDistribution(0, 3); // [1, 4] speed amount
|
||||||
private static ValueDistribution durationGen = generateDistribution(80, 320); // [4, 16] seconds speed duration
|
private static ValueDistribution durationGen = generateDistribution(80, 320); // [4, 16] seconds speed duration
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user