mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-13 12:38:34 +00:00
LuckPerms Integration (2/2)
This commit is contained in:
@ -1,10 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
@ -13,6 +9,10 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@CommandPermissions(permission = "notes", source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Manage notes for a player", usage = "/<command> <name> <list | add <note> | remove <id> | clear>")
|
||||
public class Command_notes extends FreedomCommand
|
||||
@ -39,8 +39,7 @@ public class Command_notes extends FreedomCommand
|
||||
}
|
||||
|
||||
playerData = plugin.pl.getData(entry.getName());
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
playerData = plugin.pl.getData(player);
|
||||
}
|
||||
@ -125,12 +124,10 @@ public class Command_notes extends FreedomCommand
|
||||
if (args.length == 1)
|
||||
{
|
||||
return FUtil.getPlayerList();
|
||||
}
|
||||
else if (args.length == 2)
|
||||
} else if (args.length == 2)
|
||||
{
|
||||
return Arrays.asList("list", "add", "remove", "clear");
|
||||
}
|
||||
else if (args.length > 2 && (args[1].equals("add")))
|
||||
} else if (args.length > 2 && (args[1].equals("add")))
|
||||
{
|
||||
return FUtil.getPlayerList();
|
||||
}
|
||||
|
Reference in New Issue
Block a user