Actually check that the player is allowed to have the default kit
This commit is contained in:
parent
b9640a763c
commit
8135ca022c
@ -114,7 +114,7 @@ public class GamePlayerManager implements Listener
|
||||
if (kit instanceof ProgressingKit)
|
||||
{
|
||||
ProgressingKit progressingKit = (ProgressingKit) kit;
|
||||
if (progressingKit.isDefault(player.getUniqueId()))
|
||||
if (progressingKit.canEquipKit(player) && progressingKit.isDefault(player.getUniqueId()))
|
||||
{
|
||||
progressingKit.onSelected(player.getUniqueId());
|
||||
return;
|
||||
|
@ -302,13 +302,15 @@ public class ProgressingKitManager implements Listener
|
||||
{
|
||||
UtilServer.getPlayersCollection().forEach(player ->
|
||||
{
|
||||
UUID id = player.getUniqueId();
|
||||
|
||||
for (Kit kit : _manager.GetGame().GetKits())
|
||||
{
|
||||
//Set default kit
|
||||
if (kit instanceof ProgressingKit)
|
||||
{
|
||||
ProgressingKit progressingKit = (ProgressingKit) kit;
|
||||
if (progressingKit.isDefault(player.getUniqueId()))
|
||||
if (progressingKit.canEquipKit(player) && progressingKit.isDefault(id))
|
||||
{
|
||||
progressingKit.onSelected(player.getUniqueId());
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user