Skip to content

Commit

Permalink
Merge pull request #34 from Alathra/feat/command-permissions
Browse files Browse the repository at this point in the history
feat - Permissions Setup
  • Loading branch information
ShermansWorld authored Apr 28, 2024
2 parents 137a8f9 + 224e0f0 commit c4718c2
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.api.testing;
package io.github.alathra.alathraskills.api.commands;

import org.bukkit.entity.Player;

Expand All @@ -17,7 +17,7 @@ public TestAddSkillCommandMemory() {
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skill"))
.withFullDescription("Add Skill for a Given Player.")
.withShortDescription("Add Skill")
.withPermission("example.command")
.withPermission("alathraskills.set")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.api.testing;
package io.github.alathra.alathraskills.api.commands;

import org.bukkit.entity.Player;

Expand All @@ -17,7 +17,7 @@ public TestDeleteSkillCommandMemory() {
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skill"))
.withFullDescription("Delete Skill for a Given Player.")
.withShortDescription("Delete Skill")
.withPermission("example.command")
.withPermission("alathraskills.set")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.api.testing;
package io.github.alathra.alathraskills.api.commands;

import java.util.Map.Entry;
import java.util.stream.Stream;
Expand All @@ -20,7 +20,7 @@ public TestGetAllSkillsCommandMemory() {
.withArguments(new PlayerArgument("targetPlayer"))
.withFullDescription("Get all Skills for a Given Player.")
.withShortDescription("Get Skills")
.withPermission("example.command")
.withPermission("alathraskills.get")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.api.testing;
package io.github.alathra.alathraskills.api.commands;

import org.bukkit.entity.Player;

Expand All @@ -18,7 +18,7 @@ public TestGetExerienceCommandMemory() {
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skillCategoryID"))
.withFullDescription("Get Experience For a Given Skill Category.")
.withShortDescription("Get Experience")
.withPermission("example.command")
.withPermission("alathraskills.get")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.api.testing;
package io.github.alathra.alathraskills.api.commands;

import org.bukkit.entity.Player;

Expand All @@ -18,7 +18,7 @@ public TestSetExerienceCommandMemory() {
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skillCategoryID"), new FloatArgument("Experience"))
.withFullDescription("Set Experience For a Given Skill Category in Memory.")
.withShortDescription("Set Experience")
.withPermission("example.command")
.withPermission("alathraskills.set")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

import io.github.alathra.alathraskills.AlathraSkills;
import io.github.alathra.alathraskills.Reloadable;
import io.github.alathra.alathraskills.api.testing.TestAddSkillCommandMemory;
import io.github.alathra.alathraskills.api.testing.TestDeleteSkillCommandMemory;
import io.github.alathra.alathraskills.api.testing.TestGetAllSkillsCommandMemory;
import io.github.alathra.alathraskills.api.testing.TestGetExerienceCommandMemory;
import io.github.alathra.alathraskills.api.testing.TestSetExerienceCommandMemory;
import io.github.alathra.alathraskills.db.testing.TestDeleteAllSkillsCommand;
import io.github.alathra.alathraskills.db.testing.TestGetAllSkillsCommand;
import io.github.alathra.alathraskills.db.testing.TestGetExerienceCommand;
import io.github.alathra.alathraskills.db.testing.TestHasSkillCommand;
import io.github.alathra.alathraskills.db.testing.TestSetExerienceCommand;
import io.github.alathra.alathraskills.db.testing.TestSetSkillCommand;
import io.github.alathra.alathraskills.api.commands.TestAddSkillCommandMemory;
import io.github.alathra.alathraskills.api.commands.TestDeleteSkillCommandMemory;
import io.github.alathra.alathraskills.api.commands.TestGetAllSkillsCommandMemory;
import io.github.alathra.alathraskills.api.commands.TestGetExerienceCommandMemory;
import io.github.alathra.alathraskills.api.commands.TestSetExerienceCommandMemory;
import io.github.alathra.alathraskills.db.commands.TestDeleteAllSkillsCommand;
import io.github.alathra.alathraskills.db.commands.TestGetAllSkillsCommand;
import io.github.alathra.alathraskills.db.commands.TestGetExerienceCommand;
import io.github.alathra.alathraskills.db.commands.TestHasSkillCommand;
import io.github.alathra.alathraskills.db.commands.TestSetExerienceCommand;
import io.github.alathra.alathraskills.db.commands.TestSetSkillCommand;
import dev.jorel.commandapi.CommandAPI;
import dev.jorel.commandapi.CommandAPIBukkitConfig;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.db.testing;
package io.github.alathra.alathraskills.db.commands;

import org.bukkit.entity.Player;

Expand All @@ -13,11 +13,11 @@
public class TestDeleteAllSkillsCommand {

public TestDeleteAllSkillsCommand() {
new CommandAPICommand("testDeleteSkills")
new CommandAPICommand("testDeleteSkills_db")
.withArguments(new PlayerArgument("targetPlayer"))
.withFullDescription("Deletes all skills for this player")
.withShortDescription("Get Experience")
.withPermission("example.command")
.withPermission("alathraskills.set")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.db.testing;
package io.github.alathra.alathraskills.db.commands;

import java.util.Iterator;
import java.util.UUID;
Expand All @@ -19,11 +19,11 @@
public class TestGetAllSkillsCommand {

public TestGetAllSkillsCommand() {
new CommandAPICommand("testGetAllSkills")
new CommandAPICommand("testGetAllSkills_db")
.withArguments(new PlayerArgument("targetPlayer"))
.withFullDescription("Get Experience For a Given Skill Category.")
.withShortDescription("Get Experience")
.withPermission("example.command")
.withPermission("alathraskills.get")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.db.testing;
package io.github.alathra.alathraskills.db.commands;

import org.bukkit.entity.Player;

Expand All @@ -13,11 +13,11 @@
public class TestGetExerienceCommand {

public TestGetExerienceCommand() {
new CommandAPICommand("testGetExperience")
new CommandAPICommand("testGetExperience_db")
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skillCategoryID"))
.withFullDescription("Get Experience For a Given Skill Category.")
.withShortDescription("Get Experience")
.withPermission("example.command")
.withPermission("alathraskills.get")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.db.testing;
package io.github.alathra.alathraskills.db.commands;

import org.bukkit.entity.Player;

Expand All @@ -13,11 +13,11 @@
public class TestHasSkillCommand {

public TestHasSkillCommand() {
new CommandAPICommand("testHasSkill")
new CommandAPICommand("testHasSkill_db")
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skill"))
.withFullDescription("Get Experience For a Given Skill Category.")
.withShortDescription("Get Experience")
.withPermission("example.command")
.withPermission("alathraskills.get")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.db.testing;
package io.github.alathra.alathraskills.db.commands;

import org.bukkit.entity.Player;

Expand All @@ -14,11 +14,11 @@
public class TestSetExerienceCommand {

public TestSetExerienceCommand() {
new CommandAPICommand("testSetExperience")
new CommandAPICommand("testSetExperience_db")
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skillCategoryID"), new FloatArgument("Experience"))
.withFullDescription("Set Experience For a Given Skill Category.")
.withShortDescription("Set Experience")
.withPermission("example.command")
.withPermission("alathraskills.set")
.executesPlayer(this::runCommand)
.register();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.alathra.alathraskills.db.testing;
package io.github.alathra.alathraskills.db.commands;

import org.bukkit.entity.Player;

Expand All @@ -14,11 +14,11 @@
public class TestSetSkillCommand {

public TestSetSkillCommand() {
new CommandAPICommand("testSetSkill")
new CommandAPICommand("testSetSkill_db")
.withArguments(new PlayerArgument("targetPlayer"), new IntegerArgument("skill"))
.withFullDescription("Set Experience For a Given Skill Category.")
.withShortDescription("Set Experience")
.withPermission("example.command")
.withPermission("alathraskills.set")
.executesPlayer(this::runCommand)
.register();
}
Expand Down

0 comments on commit c4718c2

Please sign in to comment.