mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-02 04:56:40 +00:00
Compare commits
19 Commits
RELEASE-20
...
proper-res
Author | SHA1 | Date | |
---|---|---|---|
1f9a36cbfb | |||
f4f60a7993 | |||
6c0856d647 | |||
33ac3a36ca | |||
42482ef8e7 | |||
11f9313653 | |||
2a3a48f2ae | |||
3dde5ef578 | |||
198f1d3acf | |||
7967bfc9f8 | |||
6566c7f305 | |||
71fe940049 | |||
e2d7f6ebcb | |||
55f8c29036 | |||
d6c68adb41 | |||
a3530ad143 | |||
8b48408870 | |||
0d0fbf2c04 | |||
997210a16f |
@ -17,7 +17,7 @@ import java.util.Random;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||||
import me.totalfreedom.totalfreedommod.command.FreedomCommand;
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.fun.Jumppads;
|
import me.totalfreedom.totalfreedommod.fun.Jumppads;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
|
@ -10,7 +10,7 @@ import me.totalfreedom.totalfreedommod.blocking.*;
|
|||||||
import me.totalfreedom.totalfreedommod.blocking.command.CommandBlocker;
|
import me.totalfreedom.totalfreedommod.blocking.command.CommandBlocker;
|
||||||
import me.totalfreedom.totalfreedommod.bridge.*;
|
import me.totalfreedom.totalfreedommod.bridge.*;
|
||||||
import me.totalfreedom.totalfreedommod.caging.Cager;
|
import me.totalfreedom.totalfreedommod.caging.Cager;
|
||||||
import me.totalfreedom.totalfreedommod.command.CommandLoader;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandLoader;
|
||||||
import me.totalfreedom.totalfreedommod.config.MainConfig;
|
import me.totalfreedom.totalfreedommod.config.MainConfig;
|
||||||
import me.totalfreedom.totalfreedommod.freeze.Freezer;
|
import me.totalfreedom.totalfreedommod.freeze.Freezer;
|
||||||
import me.totalfreedom.totalfreedommod.fun.*;
|
import me.totalfreedom.totalfreedommod.fun.*;
|
||||||
|
@ -4,15 +4,13 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
|||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.rank.DisplayableGroup;
|
import me.totalfreedom.totalfreedommod.rank.DisplayableGroup;
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.sql.ResultSetProvider;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class Admin
|
public class Admin
|
||||||
@ -32,23 +30,22 @@ public class Admin
|
|||||||
this.ips.add(FUtil.getIp(player));
|
this.ips.add(FUtil.getIp(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Admin(ResultSet resultSet)
|
public Admin(ResultSetProvider resultSet)
|
||||||
{
|
{
|
||||||
try
|
if (resultSet.getString("uuid") == null)
|
||||||
{
|
{
|
||||||
this.uuid = UUID.fromString(resultSet.getString("uuid"));
|
throw new IllegalArgumentException("Failed to load admin, as the UUID is null.");
|
||||||
this.active = resultSet.getBoolean("active");
|
|
||||||
this.rank = GroupProvider.fromArgument(resultSet.getString("rank")).getGroup();
|
|
||||||
this.ips.clear();
|
|
||||||
this.ips.addAll(FUtil.stringToList(resultSet.getString("ips")));
|
|
||||||
this.lastLogin = new Date(resultSet.getLong("last_login"));
|
|
||||||
this.commandSpy = resultSet.getBoolean("command_spy");
|
|
||||||
this.potionSpy = resultSet.getBoolean("potion_spy");
|
|
||||||
this.acFormat = resultSet.getString("ac_format");
|
|
||||||
} catch (SQLException e)
|
|
||||||
{
|
|
||||||
FLog.severe("Failed to load admin: " + e.getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.uuid = UUID.fromString(resultSet.getString("uuid"));
|
||||||
|
this.active = resultSet.getBoolean("active");
|
||||||
|
this.rank = GroupProvider.fromString(resultSet.getString("rank")).getGroup();
|
||||||
|
this.ips.clear();
|
||||||
|
this.ips.addAll(FUtil.stringToList(resultSet.getString("ips")));
|
||||||
|
this.lastLogin = new Date(resultSet.getLong("last_login"));
|
||||||
|
this.commandSpy = resultSet.getBoolean("command_spy");
|
||||||
|
this.potionSpy = resultSet.getBoolean("potion_spy");
|
||||||
|
this.acFormat = resultSet.getString("ac_format");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -70,15 +67,15 @@ public class Admin
|
|||||||
public Map<String, Object> toSQLStorable()
|
public Map<String, Object> toSQLStorable()
|
||||||
{
|
{
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("uuid", uuid.toString());
|
map.put("uuid", uuid.toString());
|
||||||
map.put("active", active);
|
map.put("active", active);
|
||||||
map.put("rank", rank.toString());
|
map.put("rank", rank.toString());
|
||||||
map.put("ips", FUtil.listToString(ips));
|
map.put("ips", FUtil.listToString(ips));
|
||||||
map.put("last_login", lastLogin.getTime());
|
map.put("last_login", lastLogin.getTime());
|
||||||
map.put("command_spy", commandSpy);
|
map.put("command_spy", commandSpy);
|
||||||
map.put("potion_spy", potionSpy);
|
map.put("potion_spy", potionSpy);
|
||||||
map.put("ac_format", acFormat);
|
map.put("ac_format", acFormat);
|
||||||
return map;
|
return map;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ import com.google.common.collect.Sets;
|
|||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
||||||
|
import me.totalfreedom.totalfreedommod.sql.ResultSetProvider;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
@ -12,14 +14,15 @@ import org.bukkit.OfflinePlayer;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.CompletionException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
public class AdminList extends FreedomService
|
public class AdminList extends FreedomService
|
||||||
{
|
{
|
||||||
public static final List<UUID> vanished = new ArrayList<>();
|
public static final List<UUID> vanished = new ArrayList<>();
|
||||||
|
public static final String SQL_SAVE_FAILED = "Failed to save admin: ";
|
||||||
private final Set<Admin> allAdmins = Sets.newHashSet(); // Includes disabled admins
|
private final Set<Admin> allAdmins = Sets.newHashSet(); // Includes disabled admins
|
||||||
// Only active admins below
|
// Only active admins below
|
||||||
private final Set<Admin> activeAdmins = Sets.newHashSet();
|
private final Set<Admin> activeAdmins = Sets.newHashSet();
|
||||||
@ -43,33 +46,37 @@ public class AdminList extends FreedomService
|
|||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
allAdmins.clear();
|
allAdmins.clear();
|
||||||
try
|
plugin.sql.getAdminList().thenAcceptAsync(provider ->
|
||||||
{
|
{
|
||||||
ResultSet adminSet = plugin.sql.getAdminList();
|
AtomicInteger row = new AtomicInteger(1);
|
||||||
while (adminSet.next())
|
provider.getAllRowsResultSet().forEach(adminSet ->
|
||||||
{
|
{
|
||||||
tryAddAdmin(adminSet);
|
try
|
||||||
}
|
{
|
||||||
} catch (SQLException e)
|
tryAddAdmin(ResultSetProvider.fromRow(adminSet));
|
||||||
|
row.set(row.get() + 1);
|
||||||
|
} catch (Throwable e)
|
||||||
|
{
|
||||||
|
FLog.warning("An error occurred whilst reading the admin entry at row #" + row.get());
|
||||||
|
throw new CompletionException(e); // handle downstream.
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).whenComplete((result, throwable) ->
|
||||||
{
|
{
|
||||||
FLog.severe("Failed to load admin list: " + e.getMessage());
|
if (throwable != null)
|
||||||
}
|
{
|
||||||
|
FLog.severe(throwable.getMessage());
|
||||||
updateTables();
|
return;
|
||||||
FLog.info("Loaded " + allAdmins.size() + " admins (" + uuidTable.size() + " active, " + ipTable.size() + " IPs)");
|
}
|
||||||
|
updateTables();
|
||||||
|
FLog.info("Loaded " + allAdmins.size() + " admins (" + uuidTable.size() + " active, " + ipTable.size() + " IPs)");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tryAddAdmin(ResultSet adminSet) throws SQLException
|
private void tryAddAdmin(ResultSetProvider adminSet)
|
||||||
{
|
{
|
||||||
try
|
Admin admin = new Admin(adminSet);
|
||||||
{
|
allAdmins.add(admin);
|
||||||
Admin admin = new Admin(adminSet);
|
|
||||||
allAdmins.add(admin);
|
|
||||||
} catch (Throwable ex)
|
|
||||||
{
|
|
||||||
FLog.warning("An error occurred whilst reading the admin entry at row #" + adminSet.getRow());
|
|
||||||
FLog.warning(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void messageAllAdmins(Component message)
|
public void messageAllAdmins(Component message)
|
||||||
@ -106,9 +113,10 @@ public class AdminList extends FreedomService
|
|||||||
return admin != null && admin.isActive();
|
return admin != null && admin.isActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cast to OfflinePlayer
|
|
||||||
public boolean isAdmin(Player player)
|
public boolean isAdmin(Player player)
|
||||||
{
|
{
|
||||||
|
if (Hierarchy.getHierarchy().isUserOnAdminTrack(player)) return true;
|
||||||
|
|
||||||
return isAdmin((OfflinePlayer) player);
|
return isAdmin((OfflinePlayer) player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,19 +132,6 @@ public class AdminList extends FreedomService
|
|||||||
return admin != null && admin.isActive();
|
return admin != null && admin.isActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSeniorAdmin(CommandSender sender)
|
|
||||||
{
|
|
||||||
Admin admin = getAdmin(sender);
|
|
||||||
if (admin == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return admin.getRank().getLuckPermsGroup().getWeight().orElse(0)
|
|
||||||
>= GroupProvider.SENIOR_ADMIN.getGroup().getLuckPermsGroup().getWeight().orElse(1);
|
|
||||||
// We don't want this to return true if there's no group weight available.
|
|
||||||
}
|
|
||||||
|
|
||||||
public Admin getAdmin(CommandSender sender)
|
public Admin getAdmin(CommandSender sender)
|
||||||
{
|
{
|
||||||
if (sender instanceof Player player)
|
if (sender instanceof Player player)
|
||||||
@ -198,7 +193,13 @@ public class AdminList extends FreedomService
|
|||||||
updateTables();
|
updateTables();
|
||||||
|
|
||||||
// Save admin
|
// Save admin
|
||||||
plugin.sql.addAdmin(admin);
|
plugin.sql.addAdmin(admin).whenComplete((result, exception) ->
|
||||||
|
{
|
||||||
|
if (exception != null)
|
||||||
|
{
|
||||||
|
FLog.warning(SQL_SAVE_FAILED + admin.getName() + " to the database.\n" + exception.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean removeAdmin(Admin admin)
|
public boolean removeAdmin(Admin admin)
|
||||||
@ -216,7 +217,13 @@ public class AdminList extends FreedomService
|
|||||||
updateTables();
|
updateTables();
|
||||||
|
|
||||||
// Unsave admin
|
// Unsave admin
|
||||||
plugin.sql.removeAdmin(admin);
|
plugin.sql.removeAdmin(admin).whenComplete((result, exception) ->
|
||||||
|
{
|
||||||
|
if (exception != null)
|
||||||
|
{
|
||||||
|
FLog.warning("Failed to remove admin: " + admin.getName() + " from the database.\n" + exception.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -261,21 +268,30 @@ public class AdminList extends FreedomService
|
|||||||
|
|
||||||
public void save(Admin admin)
|
public void save(Admin admin)
|
||||||
{
|
{
|
||||||
try
|
plugin.sql.getAdminByUuid(admin.getUuid()).thenApplyAsync(result ->
|
||||||
{
|
{
|
||||||
ResultSet currentSave = plugin.sql.getAdminByUuid(admin.getUuid());
|
|
||||||
for (Map.Entry<String, Object> entry : admin.toSQLStorable().entrySet())
|
for (Map.Entry<String, Object> entry : admin.toSQLStorable().entrySet())
|
||||||
{
|
{
|
||||||
Object storedValue = plugin.sql.getValue(currentSave, entry.getKey(), entry.getValue());
|
Object storedValue = plugin.sql.getValue(result, entry.getKey(), entry.getValue());
|
||||||
if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null || entry.getValue() == null)
|
if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null || entry.getValue() == null)
|
||||||
{
|
{
|
||||||
plugin.sql.setAdminValue(admin, entry.getKey(), entry.getValue());
|
plugin.sql.setAdminValue(admin, entry.getKey(), entry.getValue()).whenComplete((result2, exception) ->
|
||||||
|
{
|
||||||
|
if (exception != null)
|
||||||
|
{
|
||||||
|
throw new CompletionException(exception); // We want to handle downstream in #whenComplete()
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException e)
|
return null;
|
||||||
|
}).whenComplete((result, exception) ->
|
||||||
{
|
{
|
||||||
FLog.severe("Failed to save admin: " + e.getMessage());
|
if (exception != null)
|
||||||
}
|
{
|
||||||
|
FLog.severe(SQL_SAVE_FAILED + exception.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deactivateOldEntries(boolean verbose)
|
public void deactivateOldEntries(boolean verbose)
|
||||||
|
@ -2,17 +2,8 @@ package me.totalfreedom.totalfreedommod.banning;
|
|||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||||
|
import me.totalfreedom.totalfreedommod.sql.ResultSetProvider;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -21,6 +12,8 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerLoginEvent;
|
import org.bukkit.event.player.PlayerLoginEvent;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public class BanManager extends FreedomService
|
public class BanManager extends FreedomService
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -34,38 +27,38 @@ public class BanManager extends FreedomService
|
|||||||
public void onStart()
|
public void onStart()
|
||||||
{
|
{
|
||||||
bans.clear();
|
bans.clear();
|
||||||
try
|
|
||||||
|
plugin.sql.getBanList().whenComplete((result, throwable) ->
|
||||||
{
|
{
|
||||||
ResultSet banSet = plugin.sql.getBanList();
|
if (throwable != null)
|
||||||
{
|
{
|
||||||
while (banSet.next())
|
FLog.severe("Failed to load ban list: " + throwable.getMessage());
|
||||||
{
|
return;
|
||||||
String name = banSet.getString("name");
|
|
||||||
UUID uuid = null;
|
|
||||||
String strUUID = banSet.getString("uuid");
|
|
||||||
if (strUUID != null)
|
|
||||||
{
|
|
||||||
uuid = UUID.fromString(strUUID);
|
|
||||||
}
|
|
||||||
List<String> ips = FUtil.stringToList(banSet.getString("ips"));
|
|
||||||
String by = banSet.getString("by");
|
|
||||||
Date at = new Date(banSet.getLong("at"));
|
|
||||||
Date expires = new Date(banSet.getLong("expires"));
|
|
||||||
String reason = banSet.getString("reason");
|
|
||||||
Ban ban = new Ban(name, uuid, ips, by, at, expires, reason);
|
|
||||||
bans.add(ban);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (SQLException e)
|
|
||||||
{
|
|
||||||
FLog.severe("Failed to load ban list: " + e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove expired bans, repopulate ipBans and nameBans,
|
result.getAllRowsResultSet().forEach(row ->
|
||||||
updateViews();
|
{
|
||||||
|
ResultSetProvider banSet = ResultSetProvider.fromRow(row);
|
||||||
|
String name = banSet.getString("name");
|
||||||
|
UUID uuid = null;
|
||||||
|
String strUUID = banSet.getString("uuid");
|
||||||
|
if (strUUID != null)
|
||||||
|
{
|
||||||
|
uuid = UUID.fromString(strUUID);
|
||||||
|
}
|
||||||
|
List<String> ips = FUtil.stringToList(banSet.getString("ips"));
|
||||||
|
String by = banSet.getString("by");
|
||||||
|
Date at = new Date(banSet.getLong("at"));
|
||||||
|
Date expires = new Date(banSet.getLong("expires"));
|
||||||
|
String reason = banSet.getString("reason");
|
||||||
|
Ban ban = new Ban(name, uuid, ips, by, at, expires, reason);
|
||||||
|
bans.add(ban);
|
||||||
|
// Remove expired bans, repopulate ipBans and nameBans,
|
||||||
|
updateViews();
|
||||||
|
|
||||||
FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans.");
|
FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans.");
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -186,8 +179,7 @@ public class BanManager extends FreedomService
|
|||||||
if (ban.getUsername() != null && getByUsername(ban.getUsername()) != null)
|
if (ban.getUsername() != null && getByUsername(ban.getUsername()) != null)
|
||||||
{
|
{
|
||||||
removeBan(ban);
|
removeBan(ban);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
|
||||||
for (String ip : ban.getIps())
|
for (String ip : ban.getIps())
|
||||||
@ -202,8 +194,16 @@ public class BanManager extends FreedomService
|
|||||||
|
|
||||||
if (bans.add(ban))
|
if (bans.add(ban))
|
||||||
{
|
{
|
||||||
plugin.sql.addBan(ban);
|
plugin.sql.addBan(ban).whenComplete((result, ex) ->
|
||||||
updateViews();
|
{
|
||||||
|
if (ex != null)
|
||||||
|
{
|
||||||
|
FLog.severe(ex.getMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateViews();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -212,8 +212,16 @@ public class BanManager extends FreedomService
|
|||||||
{
|
{
|
||||||
if (bans.remove(ban))
|
if (bans.remove(ban))
|
||||||
{
|
{
|
||||||
plugin.sql.removeBan(ban);
|
plugin.sql.removeBan(ban).whenComplete((result, ex) ->
|
||||||
updateViews();
|
{
|
||||||
|
if (ex != null)
|
||||||
|
{
|
||||||
|
FLog.severe(ex.getMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateViews();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -223,7 +231,13 @@ public class BanManager extends FreedomService
|
|||||||
int size = bans.size();
|
int size = bans.size();
|
||||||
bans.clear();
|
bans.clear();
|
||||||
updateViews();
|
updateViews();
|
||||||
plugin.sql.truncate("bans");
|
plugin.sql.truncate("bans").whenComplete((result, ex) ->
|
||||||
|
{
|
||||||
|
if (ex != null)
|
||||||
|
{
|
||||||
|
FLog.severe(ex.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,8 +281,7 @@ public class BanManager extends FreedomService
|
|||||||
if (ban != null)
|
if (ban != null)
|
||||||
{
|
{
|
||||||
removeBan(ban);
|
removeBan(ban);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
ban = getByIp(FUtil.getIp(player));
|
ban = getByIp(FUtil.getIp(player));
|
||||||
if (ban != null)
|
if (ban != null)
|
||||||
@ -286,7 +299,13 @@ public class BanManager extends FreedomService
|
|||||||
if (ban.isExpired())
|
if (ban.isExpired())
|
||||||
{
|
{
|
||||||
bans.remove(ban);
|
bans.remove(ban);
|
||||||
plugin.sql.removeBan(ban);
|
plugin.sql.removeBan(ban).whenComplete((result, ex) ->
|
||||||
|
{
|
||||||
|
if (ex != null)
|
||||||
|
{
|
||||||
|
FLog.severe(ex.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,24 +30,6 @@ public class CommandBlocker extends FreedomService
|
|||||||
private final Map<String, CommandBlockerEntry> entryList = Maps.newHashMap();
|
private final Map<String, CommandBlockerEntry> entryList = Maps.newHashMap();
|
||||||
private final List<String> unknownCommands = Lists.newArrayList();
|
private final List<String> unknownCommands = Lists.newArrayList();
|
||||||
|
|
||||||
public static CommandMap getCommandMap()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SimplePluginManager simplePluginManager = (SimplePluginManager)Bukkit.getServer().getPluginManager();
|
|
||||||
|
|
||||||
Field commandMapField = SimplePluginManager.class.getDeclaredField("commandMap");
|
|
||||||
commandMapField.setAccessible(true);
|
|
||||||
|
|
||||||
return (SimpleCommandMap)commandMapField.get(simplePluginManager);
|
|
||||||
}
|
|
||||||
catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e)
|
|
||||||
{
|
|
||||||
FLog.severe("Failed to get command map field (" + e.getMessage() + ")");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart()
|
public void onStart()
|
||||||
{
|
{
|
||||||
@ -65,7 +47,7 @@ public class CommandBlocker extends FreedomService
|
|||||||
entryList.clear();
|
entryList.clear();
|
||||||
unknownCommands.clear();
|
unknownCommands.clear();
|
||||||
|
|
||||||
final CommandMap commandMap = getCommandMap();
|
final CommandMap commandMap = Bukkit.getCommandMap();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<String> blockedCommands = (List<String>)ConfigEntry.BLOCKED_COMMANDS.getList();
|
List<String> blockedCommands = (List<String>)ConfigEntry.BLOCKED_COMMANDS.getList();
|
||||||
|
@ -1,100 +0,0 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
|
||||||
import org.reflections.Reflections;
|
|
||||||
|
|
||||||
public class CommandLoader extends FreedomService
|
|
||||||
{
|
|
||||||
private final List<FreedomCommand> commands;
|
|
||||||
|
|
||||||
public CommandLoader()
|
|
||||||
{
|
|
||||||
commands = new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStop()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void add(FreedomCommand command)
|
|
||||||
{
|
|
||||||
commands.add(command);
|
|
||||||
command.register();
|
|
||||||
}
|
|
||||||
|
|
||||||
public FreedomCommand getByName(String name)
|
|
||||||
{
|
|
||||||
for (FreedomCommand command : commands)
|
|
||||||
{
|
|
||||||
if (name.equals(command.getName()))
|
|
||||||
{
|
|
||||||
return command;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAlias(String alias)
|
|
||||||
{
|
|
||||||
for (FreedomCommand command : commands)
|
|
||||||
{
|
|
||||||
if (Arrays.asList(command.getAliases().split(",")).contains(alias))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadCommands()
|
|
||||||
{
|
|
||||||
Reflections commandDir = new Reflections("me.totalfreedom.totalfreedommod.command");
|
|
||||||
|
|
||||||
Set<Class<? extends FreedomCommand>> commandClasses = commandDir.getSubTypesOf(FreedomCommand.class);
|
|
||||||
|
|
||||||
commandLoading:
|
|
||||||
for (Class<? extends FreedomCommand> commandClass : commandClasses)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (commandClass.isAnnotationPresent(CommandDependencies.class))
|
|
||||||
{
|
|
||||||
String[] dependencies = commandClass.getAnnotation(CommandDependencies.class).value();
|
|
||||||
|
|
||||||
for (String plugin : dependencies)
|
|
||||||
{
|
|
||||||
if (!server.getPluginManager().isPluginEnabled(plugin))
|
|
||||||
{
|
|
||||||
FLog.warning("Not loading command due to missing dependency (" + plugin + "): /" + commandClass.getSimpleName().replace("Command_", ""));
|
|
||||||
continue commandLoading;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
add(commandClass.newInstance());
|
|
||||||
}
|
|
||||||
catch (InstantiationException | IllegalAccessException | ExceptionInInitializerError ex)
|
|
||||||
{
|
|
||||||
FLog.warning("Failed to register command: /" + commandClass.getSimpleName().replace("Command_", ""));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FLog.info("Loaded " + commands.size() + " commands");
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<FreedomCommand> getCommands()
|
|
||||||
{
|
|
||||||
return commands;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.api.event.AdminChatEvent;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -3,6 +3,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
|
@ -4,6 +4,11 @@ import io.papermc.lib.PaperLib;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.world.WorldTime;
|
import me.totalfreedom.totalfreedommod.world.WorldTime;
|
||||||
import me.totalfreedom.totalfreedommod.world.WorldWeather;
|
import me.totalfreedom.totalfreedommod.world.WorldWeather;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -4,6 +4,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
@ -18,6 +19,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@Intercept("ban")
|
||||||
@CommandPermissions(permission = "ban", source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(permission = "ban", source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans the specified player.", usage = "/<command> <username> [reason] [-nrb | -q]", aliases = "gtfo")
|
@CommandParameters(description = "Bans the specified player.", usage = "/<command> <username> [reason] [-nrb | -q]", aliases = "gtfo")
|
||||||
public class Command_ban extends FreedomCommand
|
public class Command_ban extends FreedomCommand
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
@ -9,6 +10,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@Intercept("banip")
|
||||||
@CommandPermissions(permission = "banip", source = SourceType.BOTH, blockHostConsole = true)
|
@CommandPermissions(permission = "banip", source = SourceType.BOTH, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Bans the specified ip.", usage = "/<command> <ip> [reason] [-q]")
|
@CommandParameters(description = "Bans the specified ip.", usage = "/<command> <ip> [reason] [-q]")
|
||||||
public class Command_banip extends FreedomCommand
|
public class Command_banip extends FreedomCommand
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -9,6 +10,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Intercept("banlist")
|
||||||
@CommandPermissions(permission = "banlist", source = SourceType.BOTH)
|
@CommandPermissions(permission = "banlist", source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Shows all banned player names. Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
|
@CommandParameters(description = "Shows all banned player names. Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
|
||||||
public class Command_banlist extends FreedomCommand
|
public class Command_banlist extends FreedomCommand
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
|
@ -3,6 +3,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.SplittableRandom;
|
import java.util.SplittableRandom;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -4,6 +4,11 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -3,6 +3,10 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.SplittableRandom;
|
import java.util.SplittableRandom;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.format.TextDecoration;
|
import net.kyori.adventure.text.format.TextDecoration;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.rank.HierarchyProvider;
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.luckperms.api.model.user.User;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
|
@Intercept("deop")
|
||||||
@CommandPermissions(permission = "deop", source = SourceType.BOTH)
|
@CommandPermissions(permission = "deop", source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Deop a player", usage = "/<command> <partialname>")
|
@CommandParameters(description = "Deop a player", usage = "/<command> <partialname>")
|
||||||
public class Command_deop extends FreedomCommand
|
public class Command_deop extends FreedomCommand
|
||||||
@ -39,17 +40,22 @@ public class Command_deop extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
AtomicBoolean atomicBoolean = new AtomicBoolean(silent);
|
AtomicBoolean atomicBoolean = new AtomicBoolean(silent);
|
||||||
User user = GroupProvider.getUser(player);
|
Hierarchy.getHierarchy().demoteUser(Hierarchy.getHierarchy().op(), player).whenComplete((result, throwable) ->
|
||||||
HierarchyProvider.OP.getHierarchy().demoteUser(user).whenComplete((result, throwable) ->
|
|
||||||
{
|
{
|
||||||
if (throwable != null)
|
if (throwable != null)
|
||||||
{
|
{
|
||||||
FLog.severe("Error while demoting " + player.getName() + " to OP: " + throwable.getMessage());
|
msgNew("<red>Could not demote <player> to non-OP. Check the logs for more details.", player(player));
|
||||||
|
FLog.severe("Error while demoting " + player.getName() + " to non-OP:");
|
||||||
|
FLog.severe(throwable);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == null || !result.wasSuccessful()) {
|
||||||
|
msgNew("<red><player> is already non-op.", Placeholder.unparsed("player", player.getName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg(player, YOU_ARE_NOT_OP);
|
msg(player, YOU_ARE_NOT_OP);
|
||||||
plugin.rm.updateDisplay(player);
|
|
||||||
|
|
||||||
if (!atomicBoolean.get())
|
if (!atomicBoolean.get())
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
import me.totalfreedom.totalfreedommod.rank.HierarchyProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.luckperms.api.model.user.User;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -20,17 +23,23 @@ public class Command_deopall extends FreedomCommand
|
|||||||
FUtil.adminAction(sender.getName(), "De-opping all players on the server", true);
|
FUtil.adminAction(sender.getName(), "De-opping all players on the server", true);
|
||||||
|
|
||||||
server.getOnlinePlayers().forEach(player ->
|
server.getOnlinePlayers().forEach(player ->
|
||||||
{
|
Hierarchy.getHierarchy().demoteUser(Hierarchy.getHierarchy().op(), player).whenComplete((result, ex) ->
|
||||||
User user = GroupProvider.getUser(player);
|
{
|
||||||
HierarchyProvider.OP.getHierarchy().demoteUser(user).whenComplete((result, ex) -> {
|
if (ex != null)
|
||||||
if (ex != null) {
|
{
|
||||||
FLog.severe("Failed to demote " + player.getName() + " to default rank");
|
msgNew("<red>Could not demote <player> to non-OP. Check the logs for more details.", player(player));
|
||||||
}
|
FLog.severe("Failed to demote " + player.getName() + " to non-OP:");
|
||||||
|
FLog.severe(ex);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
msg(player, YOU_ARE_NOT_OP);
|
if (result == null || !result.wasSuccessful()) {
|
||||||
plugin.rm.updateDisplay(player);
|
msgNew("<red><player> is already non-OP.", Placeholder.unparsed("player", player.getName()));
|
||||||
});
|
return;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
msg(player, YOU_ARE_NOT_OP);
|
||||||
|
}));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -2,6 +2,10 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -7,6 +7,10 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -3,6 +3,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import me.totalfreedom.totalfreedommod.util.Groups;
|
import me.totalfreedom.totalfreedommod.util.Groups;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -2,6 +2,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -2,6 +2,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.freeze.FreezeData;
|
import me.totalfreedom.totalfreedommod.freeze.FreezeData;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -3,6 +3,10 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import org.apache.commons.lang.math.DoubleRange;
|
import org.apache.commons.lang.math.DoubleRange;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -5,9 +5,12 @@ import java.util.List;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -3,6 +3,11 @@ package me.totalfreedom.totalfreedommod.command;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.fun.Jumppads;
|
import me.totalfreedom.totalfreedommod.fun.Jumppads;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
@ -12,6 +12,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@Intercept("kick")
|
||||||
@CommandPermissions(permission = "kick", source = SourceType.BOTH)
|
@CommandPermissions(permission = "kick", source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Kick the specified player.", usage = "/<command> <player> [reason] [-q]")
|
@CommandParameters(description = "Kick the specified player.", usage = "/<command> <player> [reason] [-q]")
|
||||||
public class Command_kick extends FreedomCommand
|
public class Command_kick extends FreedomCommand
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.fun.Landminer.Landmine;
|
import me.totalfreedom.totalfreedommod.fun.Landminer.Landmine;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.JoinConfiguration;
|
import net.kyori.adventure.text.JoinConfiguration;
|
||||||
import net.kyori.adventure.text.TextComponent;
|
import net.kyori.adventure.text.TextComponent;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Intercept("list")
|
||||||
@CommandPermissions(permission = "list", source = SourceType.BOTH)
|
@CommandPermissions(permission = "list", source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Lists the real names of all online players.", usage = "/<command> [-a | -v]", aliases = "who,lsit")
|
@CommandParameters(description = "Lists the real names of all online players.", usage = "/<command> [-a | -v]", aliases = "who,lsit")
|
||||||
public class Command_list extends FreedomCommand
|
public class Command_list extends FreedomCommand
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.world.WorldTime;
|
import me.totalfreedom.totalfreedommod.world.WorldTime;
|
||||||
import me.totalfreedom.totalfreedommod.world.WorldWeather;
|
import me.totalfreedom.totalfreedommod.world.WorldWeather;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -26,13 +33,12 @@ public class Command_mbconfig extends FreedomCommand
|
|||||||
|
|
||||||
switch (args[0])
|
switch (args[0])
|
||||||
{
|
{
|
||||||
case "list":
|
case "list" ->
|
||||||
{
|
{
|
||||||
msg("Master Builders: " + StringUtils.join(plugin.pl.getMasterBuilderNames(), ", "), ChatColor.GOLD);
|
msg("Master Builders: " + StringUtils.join(plugin.pl.getMasterBuilderNames(), ", "), ChatColor.GOLD);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
case "clearips" ->
|
||||||
case "clearips":
|
|
||||||
{
|
{
|
||||||
if (args.length > 1)
|
if (args.length > 1)
|
||||||
{
|
{
|
||||||
@ -55,13 +61,23 @@ public class Command_mbconfig extends FreedomCommand
|
|||||||
int counter = data.getIps().size() - 1;
|
int counter = data.getIps().size() - 1;
|
||||||
data.clearIps();
|
data.clearIps();
|
||||||
data.addIp(FUtil.getIp(playerSender));
|
data.addIp(FUtil.getIp(playerSender));
|
||||||
plugin.sql.addPlayer(data);
|
plugin.sql.addPlayer(data).whenComplete((result, ex) ->
|
||||||
msg(counter + " IPs removed.");
|
{
|
||||||
msg(data.getIps().get(0) + " is now your only IP address");
|
if (ex != null)
|
||||||
FUtil.adminAction(sender.getName(), "Clearing my IPs", true);
|
{
|
||||||
|
FLog.severe(ex.getMessage());
|
||||||
|
msgNew("<red>Failed to clear IPs!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
msg(counter + " IPs removed.");
|
||||||
|
msg(data.getIps().get(0) + " is now your only IP address");
|
||||||
|
FUtil.adminAction(sender.getName(), "Clearing my IPs", true);
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "clearip":
|
case "clearip" ->
|
||||||
{
|
{
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
@ -89,12 +105,21 @@ public class Command_mbconfig extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
data.removeIp(args[1]);
|
data.removeIp(args[1]);
|
||||||
plugin.sql.addPlayer(data);
|
plugin.sql.addPlayer(data).whenComplete((result, ex) ->
|
||||||
msg("Removed IP " + args[1]);
|
{
|
||||||
msg("Current IPs: " + StringUtils.join(data.getIps(), ", "));
|
if (ex != null)
|
||||||
|
{
|
||||||
|
FLog.severe(ex.getMessage());
|
||||||
|
msgNew("<red>Failed to remove IP!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
msg("Removed IP " + args[1]);
|
||||||
|
msg("Current IPs: " + StringUtils.join(data.getIps(), ", "));
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "add":
|
case "add" ->
|
||||||
{
|
{
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
@ -120,18 +145,16 @@ public class Command_mbconfig extends FreedomCommand
|
|||||||
{
|
{
|
||||||
FUtil.adminAction(sender.getName(), "Adding " + data.getName() + " to the Master Builder list", true);
|
FUtil.adminAction(sender.getName(), "Adding " + data.getName() + " to the Master Builder list", true);
|
||||||
data.setMasterBuilder(true);
|
data.setMasterBuilder(true);
|
||||||
|
Hierarchy.getHierarchy()
|
||||||
|
.addUserToGroup(GroupProvider.MASTER_BUILDER.getGroup(), player);
|
||||||
plugin.pl.save(data);
|
plugin.pl.save(data);
|
||||||
if (player != null)
|
|
||||||
{
|
|
||||||
plugin.rm.updateDisplay(player);
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
msg("That player is already on the Master Builder list.");
|
msg("That player is already on the Master Builder list.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "remove":
|
case "remove" ->
|
||||||
{
|
{
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
@ -144,24 +167,23 @@ public class Command_mbconfig extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player player = getPlayer(args[1]);
|
Player player = getPlayer(args[1]);
|
||||||
PlayerData data = player != null ? plugin.pl.getData(player) : plugin.pl.getData(args[1]);
|
PlayerData data = plugin.pl.getData(args[1]);
|
||||||
|
|
||||||
if (data == null || !data.isMasterBuilder())
|
if (player == null || data == null || !data.isMasterBuilder())
|
||||||
{
|
{
|
||||||
msg("Master Builder not found: " + args[1]);
|
msgNew("Master Builder not found: <arg>", arg(args[1]));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Removing " + data.getName() + " from the Master Builder list", true);
|
FUtil.adminAction(sender.getName(), "Removing " + data.getName() + " from the Master Builder list", true);
|
||||||
|
Hierarchy.getHierarchy()
|
||||||
|
.dropUserFromAll(Hierarchy.getHierarchy().builder(), player);
|
||||||
data.setMasterBuilder(false);
|
data.setMasterBuilder(false);
|
||||||
plugin.pl.save(data);
|
plugin.pl.save(data);
|
||||||
if (player != null)
|
|
||||||
{
|
|
||||||
plugin.rm.updateDisplay(player);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
default:
|
default ->
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.GameRuleHandler;
|
import me.totalfreedom.totalfreedommod.GameRuleHandler;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import me.totalfreedom.totalfreedommod.util.Groups;
|
import me.totalfreedom.totalfreedommod.util.Groups;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
@ -12,6 +13,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
@Intercept("mute")
|
||||||
@CommandPermissions(permission = "mute", source = SourceType.BOTH)
|
@CommandPermissions(permission = "mute", source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> <[-q] <player> [reason] | list | purge | all>", aliases = "stfu")
|
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> <[-q] <player> [reason] | list | purge | all>", aliases = "stfu")
|
||||||
public class Command_mute extends FreedomCommand
|
public class Command_mute extends FreedomCommand
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
||||||
import me.totalfreedom.totalfreedommod.util.FConverter;
|
import me.totalfreedom.totalfreedommod.util.FConverter;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
|
||||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.rank.HierarchyProvider;
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.luckperms.api.model.user.User;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -12,6 +11,7 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
|
@Intercept("op")
|
||||||
@CommandPermissions(permission = "op", source = SourceType.BOTH, cooldown = 5)
|
@CommandPermissions(permission = "op", source = SourceType.BOTH, cooldown = 5)
|
||||||
@CommandParameters(description = "OP a player", usage = "/<command> <partialname>")
|
@CommandParameters(description = "OP a player", usage = "/<command> <partialname>")
|
||||||
public class Command_op extends FreedomCommand
|
public class Command_op extends FreedomCommand
|
||||||
@ -40,17 +40,27 @@ public class Command_op extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
AtomicBoolean atomicBoolean = new AtomicBoolean(silent);
|
AtomicBoolean atomicBoolean = new AtomicBoolean(silent);
|
||||||
User user = GroupProvider.getUser(player);
|
Hierarchy.getHierarchy().promoteUser(Hierarchy.getHierarchy().op(), player).whenComplete((result, throwable) ->
|
||||||
HierarchyProvider.OP.getHierarchy().promoteUser(user).whenComplete((ignored, throwable) ->
|
|
||||||
{
|
{
|
||||||
if (throwable != null)
|
if (throwable != null)
|
||||||
{
|
{
|
||||||
FLog.severe("Failed to promote user " + player.getName());
|
msgNew("<red>Failed to promote <player> to OP. Check logs for more details.", player(player));
|
||||||
|
FLog.severe("Failed to promote " + player.getName() + " to OP:");
|
||||||
|
FLog.severe(throwable);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
|
msgNew("<red><player> was not on the track! Added.", player(player));
|
||||||
|
}
|
||||||
|
else if (!result.wasSuccessful())
|
||||||
|
{
|
||||||
|
msgNew("<red><player> is already OP!", player(player));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg(player, YOU_ARE_OP);
|
msg(player, YOU_ARE_OP);
|
||||||
plugin.rm.updateDisplay(player);
|
|
||||||
if (!atomicBoolean.get())
|
if (!atomicBoolean.get())
|
||||||
{
|
{
|
||||||
FUtil.adminAction(sender.getName(), "Opping " + player.getName(), false);
|
FUtil.adminAction(sender.getName(), "Opping " + player.getName(), false);
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
import me.totalfreedom.totalfreedommod.rank.HierarchyProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.luckperms.api.model.user.User;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -19,20 +21,25 @@ public class Command_opall extends FreedomCommand
|
|||||||
FUtil.adminAction(sender.getName(), "Opping all players on the server", true);
|
FUtil.adminAction(sender.getName(), "Opping all players on the server", true);
|
||||||
|
|
||||||
server.getOnlinePlayers().forEach(player ->
|
server.getOnlinePlayers().forEach(player ->
|
||||||
{
|
Hierarchy.getHierarchy().promoteUser(Hierarchy.getHierarchy().op(), player).whenComplete((result, throwable) ->
|
||||||
User user = GroupProvider.getUser(player);
|
|
||||||
HierarchyProvider.OP.getHierarchy().promoteUser(user).whenComplete((ignored, throwable) ->
|
|
||||||
{
|
|
||||||
if (throwable != null)
|
|
||||||
{
|
{
|
||||||
FLog.severe("Failed to promote " + player.getName());
|
if (throwable != null)
|
||||||
return;
|
{
|
||||||
}
|
msgNew("<red>Failed to promote <player> to OP. Check the logs for more details.", player(player));
|
||||||
|
FLog.severe("Failed to promote " + player.getName());
|
||||||
|
FLog.severe(throwable);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
msg(player, YOU_ARE_OP);
|
if (result == null) {
|
||||||
plugin.rm.updateDisplay(player);
|
msgNew("<red><player> was not present on the track! Added.", player(player));
|
||||||
});
|
} else if (!result.wasSuccessful()) {
|
||||||
});
|
msgNew("<red>Player is already OP!", player(player));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
msg(player, YOU_ARE_OP);
|
||||||
|
}));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
import me.totalfreedom.totalfreedommod.rank.HierarchyProvider;
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
|
import me.totalfreedom.totalfreedommod.rank.Hierarchy;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import net.luckperms.api.model.user.User;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -18,15 +20,21 @@ public class Command_opme extends FreedomCommand
|
|||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
FUtil.adminAction(sender.getName(), "Opping " + sender.getName(), false);
|
FUtil.adminAction(sender.getName(), "Opping " + sender.getName(), false);
|
||||||
User user = GroupProvider.getUser(playerSender);
|
Hierarchy.getHierarchy().promoteUser(Hierarchy.getHierarchy().op(), playerSender)
|
||||||
HierarchyProvider.OP.getHierarchy().promoteUser(user).whenComplete((result, error) -> {
|
.whenComplete((result, error) ->
|
||||||
if (error != null) {
|
{
|
||||||
|
if (error != null)
|
||||||
|
{
|
||||||
FLog.severe("Error while promoting " + playerSender.getName() + " to OP: " + error.getMessage());
|
FLog.severe("Error while promoting " + playerSender.getName() + " to OP: " + error.getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result != null && !result.wasSuccessful()) {
|
||||||
|
msgNew("<red>You are already op!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
msg(YOU_ARE_OP);
|
msg(YOU_ARE_OP);
|
||||||
plugin.rm.updateDisplay(playerSender);
|
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -13,6 +14,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Intercept("potion")
|
||||||
@CommandPermissions(permission = "potion", source = SourceType.BOTH)
|
@CommandPermissions(permission = "potion", source = SourceType.BOTH)
|
||||||
@CommandParameters(
|
@CommandParameters(
|
||||||
description = "Manipulate your potion effects. Duration is measured in server ticks (~20 ticks per second).",
|
description = "Manipulate your potion effects. Duration is measured in server ticks (~20 ticks per second).",
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.math.NumberUtils;
|
import org.apache.commons.lang.math.NumberUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Displayable;
|
import me.totalfreedom.totalfreedommod.rank.Displayable;
|
||||||
import me.totalfreedom.totalfreedommod.rank.DisplayableGroup;
|
import me.totalfreedom.totalfreedommod.rank.DisplayableGroup;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -8,6 +9,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@Intercept("report")
|
||||||
@CommandPermissions(permission = "report", source = SourceType.ONLY_IN_GAME, blockHostConsole = true)
|
@CommandPermissions(permission = "report", source = SourceType.ONLY_IN_GAME, blockHostConsole = true)
|
||||||
@CommandParameters(description = "Report a player for all admins to see.", usage = "/<command> <player> <reason>")
|
@CommandParameters(description = "Report a player for all admins to see.", usage = "/<command> <player> <reason>")
|
||||||
public class Command_report extends FreedomCommand
|
public class Command_report extends FreedomCommand
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandParameters;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.CommandPermissions;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.FreedomCommand;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.SourceType;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
import me.totalfreedom.totalfreedommod.api.ShopItem;
|
||||||
|
import me.totalfreedom.totalfreedommod.command.handling.*;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user