Skip to content

Commit

Permalink
Added GrantUtil and PunishmentUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
CreaxxOG committed Jul 8, 2024
1 parent 259d57d commit 8547a6f
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/java/xyz/refinedev/phoenix/utils/GrantUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package xyz.refinedev.phoenix.utils;

import lombok.experimental.UtilityClass;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.IllegalPluginAccessException;
import xyz.refinedev.phoenix.profile.Profile;
import xyz.refinedev.phoenix.profile.grant.Grant;
import xyz.refinedev.phoenix.rank.Rank;
import xyz.refinedev.phoenix.scope.Scope;

import java.util.List;

/**
* @author Creaxx
* Created At: 09/11/2023
*/

@UtilityClass
public class GrantUtil {
public boolean canEdit(CommandSender sender, Profile target) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public void giveRank(CommandSender sender, Profile target, long duration, boolean permanent, String reason, Rank rank, List<Scope> scopes) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public void takeRank(CommandSender sender, Profile target, Grant grant, String reason) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}
}
59 changes: 59 additions & 0 deletions src/main/java/xyz/refinedev/phoenix/utils/PunishmentUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package xyz.refinedev.phoenix.utils;

import lombok.experimental.UtilityClass;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.IllegalPluginAccessException;
import xyz.refinedev.phoenix.profile.Profile;
import xyz.refinedev.phoenix.profile.punishment.Punishment;

import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;

/**
* @author Creaxx
* Created At: 09/11/2023
*/

@UtilityClass
public class PunishmentUtil {
public boolean containsSilent(String reason) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public String sanitizeReason(String reason, String defaultReason) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public void execute(CommandSender sender, Punishment punishment) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public void executeAsync(CommandSender sender, Punishment punishment) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public void executeUnpunish(CommandSender sender, Punishment punishment) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public boolean canPunish(CommandSender sender, Profile target, AtomicBoolean vsilent) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public String replaceKickUnpunishMessage(String s, Punishment punishment) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public String getAltColor(UUID uuid) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public String getAltColor(Profile profile) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

public String getAltStatus(Profile profile) {
throw new IllegalPluginAccessException("You need to install the plugin.");
}

}

0 comments on commit 8547a6f

Please sign in to comment.