Dieser Commit ist enthalten in:
Ursprung
4205bce893
Commit
12482b3886
@ -1 +1 @@
|
|||||||
Subproject commit 1dea71993d897354d3f52a705f6e0e1e0c8ec580
|
Subproject commit a249d66dcf96bb9aef44b700438c81670ad81de7
|
@ -69,7 +69,7 @@ mainClassName = ''
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
srcDirs = ['src/']
|
srcDirs = ['src/', 'build/generated/sources/annotationProcessor/java/main/']
|
||||||
}
|
}
|
||||||
resources {
|
resources {
|
||||||
srcDirs = ['src/']
|
srcDirs = ['src/']
|
||||||
@ -102,6 +102,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
implementation project(":CommonCore")
|
implementation project(":CommonCore")
|
||||||
|
annotationProcessor project(":CommonCore")
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildProject {
|
task buildProject {
|
||||||
|
@ -19,16 +19,21 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore;
|
package de.steamwar.bungeecore;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Plain;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
class Broadcaster {
|
@Linked(Plain.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
|
public class Broadcaster {
|
||||||
|
|
||||||
private static String [] broadCastMsgs;
|
private static String [] broadCastMsgs;
|
||||||
private int lastBroadCast = 0;
|
private int lastBroadCast = 0;
|
||||||
|
|
||||||
Broadcaster(){
|
public Broadcaster(){
|
||||||
ProxyServer.getInstance().getScheduler().schedule(BungeeCore.get(), () -> {
|
ProxyServer.getInstance().getScheduler().schedule(BungeeCore.get(), () -> {
|
||||||
if(!ProxyServer.getInstance().getPlayers().isEmpty())
|
if(!ProxyServer.getInstance().getPlayers().isEmpty())
|
||||||
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + broadCastMsgs[lastBroadCast]);
|
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + broadCastMsgs[lastBroadCast]);
|
||||||
|
@ -19,20 +19,21 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore;
|
package de.steamwar.bungeecore;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
|
||||||
import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig;
|
import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig;
|
||||||
import de.steamwar.bungeecore.commands.*;
|
import de.steamwar.bungeecore.commands.*;
|
||||||
import de.steamwar.bungeecore.listeners.*;
|
import de.steamwar.bungeecore.listeners.*;
|
||||||
import de.steamwar.bungeecore.listeners.mods.*;
|
import de.steamwar.bungeecore.listeners.mods.*;
|
||||||
import de.steamwar.bungeecore.listeners.ping.PingListener;
|
|
||||||
import de.steamwar.bungeecore.network.BungeeNetworkHandler;
|
import de.steamwar.bungeecore.network.BungeeNetworkHandler;
|
||||||
import de.steamwar.bungeecore.network.NetworkReceiver;
|
|
||||||
import de.steamwar.bungeecore.sql.*;
|
import de.steamwar.bungeecore.sql.*;
|
||||||
import de.steamwar.bungeecore.tablist.TablistManager;
|
|
||||||
import de.steamwar.command.SWCommandUtils;
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.command.SWTypeMapperCreator;
|
import de.steamwar.command.SWTypeMapperCreator;
|
||||||
import de.steamwar.command.TabCompletionCache;
|
import de.steamwar.command.TabCompletionCache;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.bungeecore.linkage.LinkageUtils;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
|
import de.steamwar.linkage.types.DisableLink;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
|
import de.steamwar.linkage.types.Plain;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.ChatMessageType;
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
@ -72,7 +73,6 @@ public class BungeeCore extends Plugin {
|
|||||||
|
|
||||||
public static Node local;
|
public static Node local;
|
||||||
private ErrorLogger errorLogger;
|
private ErrorLogger errorLogger;
|
||||||
private TablistManager tablistManager;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
@ -99,20 +99,8 @@ public class BungeeCore extends Plugin {
|
|||||||
});
|
});
|
||||||
BungeeCord.getInstance().getScheduler().schedule(this, TabCompletionCache::invalidateOldEntries, 1, 1, TimeUnit.SECONDS);
|
BungeeCord.getInstance().getScheduler().schedule(this, TabCompletionCache::invalidateOldEntries, 1, 1, TimeUnit.SECONDS);
|
||||||
|
|
||||||
new ConnectionListener();
|
BungeeNetworkHandler.register();
|
||||||
new Forge();
|
LinkageUtils.run(Plain.class, ListenerLink.class);
|
||||||
new Forge12();
|
|
||||||
new LabyMod();
|
|
||||||
new Badlion();
|
|
||||||
new ChatListener();
|
|
||||||
new BanListener();
|
|
||||||
new CheckListener();
|
|
||||||
new ModLoaderBlocker();
|
|
||||||
new WorldDownloader();
|
|
||||||
new BrandListener();
|
|
||||||
new Fabric();
|
|
||||||
new SubserverProtocolFixer();
|
|
||||||
new PingListener();
|
|
||||||
|
|
||||||
local = new Node.LocalNode();
|
local = new Node.LocalNode();
|
||||||
//new Node.RemoteNode("lx");
|
//new Node.RemoteNode("lx");
|
||||||
@ -122,99 +110,29 @@ public class BungeeCore extends Plugin {
|
|||||||
commands.put("/bauchat", null);
|
commands.put("/bauchat", null);
|
||||||
commands.put("/local", null);
|
commands.put("/local", null);
|
||||||
|
|
||||||
new TeamchatCommand();
|
LinkageUtils.run(Command.class);
|
||||||
new MsgCommand();
|
|
||||||
new RCommand();
|
|
||||||
new PingCommand();
|
|
||||||
new AlertCommand();
|
|
||||||
new KickCommand();
|
|
||||||
new JoinmeCommand();
|
|
||||||
new TpCommand();
|
|
||||||
new HelpCommand();
|
|
||||||
new TeamCommand();
|
|
||||||
new ServerTeamchatCommand();
|
|
||||||
new DevCommand();
|
|
||||||
new EventCommand();
|
new EventCommand();
|
||||||
new EventreloadCommand();
|
new HelpCommand();
|
||||||
new EventRescheduleCommand();
|
new JoinmeCommand();
|
||||||
new PollCommand();
|
new TeamCommand();
|
||||||
new BugCommand();
|
new TpCommand();
|
||||||
new WhoisCommand();
|
|
||||||
new RegelnCommand();
|
|
||||||
new IgnoreCommand();
|
|
||||||
new UnIgnoreCommand();
|
|
||||||
new PollresultCommand();
|
|
||||||
new ListCommand();
|
|
||||||
new StatCommand();
|
|
||||||
new VerifyCommand();
|
|
||||||
new GDPRQuery();
|
|
||||||
new PlaytimeCommand();
|
|
||||||
new ArenaCommand();
|
|
||||||
new RankCommand();
|
|
||||||
new LocalCommand();
|
|
||||||
new SetLocaleCommand();
|
|
||||||
new BuilderCloudCommand();
|
|
||||||
|
|
||||||
// Punishment Commands:
|
// Punishment Commands:
|
||||||
new PunishmentCommand("ban", Punishment.PunishmentType.Ban);
|
for (Punishment.PunishmentType punishmentType : Punishment.PunishmentType.values()) {
|
||||||
new PunishmentCommand("mute", Punishment.PunishmentType.Mute);
|
new PunishmentCommand(punishmentType.name().toLowerCase(), punishmentType);
|
||||||
new PunishmentCommand("noschemreceiving", Punishment.PunishmentType.NoSchemReceiving);
|
|
||||||
new PunishmentCommand("noschemsharing", Punishment.PunishmentType.NoSchemSharing);
|
|
||||||
new PunishmentCommand("noschemsubmitting", Punishment.PunishmentType.NoSchemSubmitting);
|
|
||||||
new PunishmentCommand("nodev", Punishment.PunishmentType.NoDevServer);
|
|
||||||
new PunishmentCommand("nofight", Punishment.PunishmentType.NoFightServer);
|
|
||||||
new PunishmentCommand("noteamserver", Punishment.PunishmentType.NoTeamServer);
|
|
||||||
new PunishmentCommand("note", Punishment.PunishmentType.Note);
|
|
||||||
|
|
||||||
if(!EVENT_MODE){
|
|
||||||
new BauCommand();
|
|
||||||
new WebpasswordCommand();
|
|
||||||
new FightCommand();
|
|
||||||
new ChallengeCommand();
|
|
||||||
new HistoricCommand();
|
|
||||||
new CheckCommand();
|
|
||||||
new ReplayCommand();
|
|
||||||
new TutorialCommand();
|
|
||||||
|
|
||||||
new Broadcaster();
|
|
||||||
}else{
|
|
||||||
new EventModeListener();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new EventStarter();
|
|
||||||
new SessionManager();
|
|
||||||
new NetworkReceiver();
|
|
||||||
BungeeNetworkHandler.register();
|
|
||||||
tablistManager = new TablistManager();
|
|
||||||
new SettingsChangedListener();
|
|
||||||
|
|
||||||
getProxy().getScheduler().schedule(this, () -> {
|
getProxy().getScheduler().schedule(this, () -> {
|
||||||
SteamwarUser.clearCache();
|
SteamwarUser.clearCache();
|
||||||
UserElo.clearCache();
|
UserElo.clearCache();
|
||||||
Team.clearCache();
|
Team.clearCache();
|
||||||
}, 1, 1, TimeUnit.HOURS);
|
}, 1, 1, TimeUnit.HOURS);
|
||||||
|
|
||||||
if (SteamwarDiscordBotConfig.loaded) {
|
|
||||||
try {
|
|
||||||
new SteamwarDiscordBot();
|
|
||||||
} catch (Throwable e) {
|
|
||||||
getLogger().log(Level.SEVERE, "Could not initialize discord bot", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable(){
|
public void onDisable(){
|
||||||
if (SteamwarDiscordBotConfig.loaded) {
|
LinkageUtils.run(DisableLink.class);
|
||||||
try {
|
|
||||||
SteamwarDiscordBot.instance().getJda().shutdown();
|
|
||||||
} catch (Throwable e) {
|
|
||||||
getLogger().log(Level.SEVERE, "Could not shutdown discord bot", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tablistManager != null)
|
|
||||||
tablistManager.disable();
|
|
||||||
errorLogger.unregister();
|
errorLogger.unregister();
|
||||||
Statement.closeAll();
|
Statement.closeAll();
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ import de.steamwar.bungeecore.sql.Event;
|
|||||||
import de.steamwar.bungeecore.sql.EventFight;
|
import de.steamwar.bungeecore.sql.EventFight;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.bungeecore.sql.Team;
|
import de.steamwar.bungeecore.sql.Team;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Plain;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -35,11 +37,12 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
import static de.steamwar.bungeecore.Storage.eventServer;
|
import static de.steamwar.bungeecore.Storage.eventServer;
|
||||||
|
|
||||||
|
@Linked(Plain.class)
|
||||||
public class EventStarter implements Runnable {
|
public class EventStarter implements Runnable {
|
||||||
|
|
||||||
private static ScheduledTask task = null;
|
private static ScheduledTask task = null;
|
||||||
|
|
||||||
EventStarter(){
|
public EventStarter(){
|
||||||
EventFight.loadAllComingFights();
|
EventFight.loadAllComingFights();
|
||||||
|
|
||||||
if(task != null)
|
if(task != null)
|
||||||
|
@ -29,6 +29,11 @@ import de.steamwar.bungeecore.bot.util.DiscordRolesMessage;
|
|||||||
import de.steamwar.bungeecore.bot.util.DiscordRulesMessage;
|
import de.steamwar.bungeecore.bot.util.DiscordRulesMessage;
|
||||||
import de.steamwar.bungeecore.bot.util.DiscordTicketMessage;
|
import de.steamwar.bungeecore.bot.util.DiscordTicketMessage;
|
||||||
import de.steamwar.bungeecore.sql.Event;
|
import de.steamwar.bungeecore.sql.Event;
|
||||||
|
import de.steamwar.linkage.DiscordMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.api.Disable;
|
||||||
|
import de.steamwar.linkage.types.DisableLink;
|
||||||
|
import de.steamwar.linkage.types.Plain;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.dv8tion.jda.api.JDA;
|
import net.dv8tion.jda.api.JDA;
|
||||||
@ -48,7 +53,10 @@ import java.util.Map;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class SteamwarDiscordBot {
|
@Linked(Plain.class)
|
||||||
|
@DiscordMode
|
||||||
|
@Linked(DisableLink.class)
|
||||||
|
public class SteamwarDiscordBot implements Disable {
|
||||||
|
|
||||||
private static SteamwarDiscordBot INSTANCE;
|
private static SteamwarDiscordBot INSTANCE;
|
||||||
|
|
||||||
@ -163,4 +171,9 @@ public class SteamwarDiscordBot {
|
|||||||
public void addListener(ListenerAdapter listenerAdapter) {
|
public void addListener(ListenerAdapter listenerAdapter) {
|
||||||
jda.addEventListener(listenerAdapter);
|
jda.addEventListener(listenerAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disable() {
|
||||||
|
INSTANCE.getJda().shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,10 +22,13 @@ package de.steamwar.bungeecore.commands;
|
|||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class AlertCommand extends SWCommand {
|
public class AlertCommand extends SWCommand {
|
||||||
|
|
||||||
public AlertCommand() {
|
public AlertCommand() {
|
||||||
|
@ -23,6 +23,8 @@ import de.steamwar.bungeecore.Servertype;
|
|||||||
import de.steamwar.bungeecore.Subserver;
|
import de.steamwar.bungeecore.Subserver;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -31,6 +33,7 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class ArenaCommand extends SWCommand {
|
public class ArenaCommand extends SWCommand {
|
||||||
|
|
||||||
public ArenaCommand() {
|
public ArenaCommand() {
|
||||||
|
@ -28,6 +28,9 @@ import de.steamwar.bungeecore.util.Chat19;
|
|||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import de.steamwar.network.packets.server.BaumemberUpdatePacket;
|
import de.steamwar.network.packets.server.BaumemberUpdatePacket;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
@ -39,6 +42,8 @@ import java.util.Collection;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class BauCommand extends SWCommand {
|
public class BauCommand extends SWCommand {
|
||||||
|
|
||||||
public BauCommand(){
|
public BauCommand(){
|
||||||
|
@ -22,9 +22,12 @@ package de.steamwar.bungeecore.commands;
|
|||||||
import de.steamwar.bungeecore.sql.SWException;
|
import de.steamwar.bungeecore.sql.SWException;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class BugCommand extends SWCommand {
|
public class BugCommand extends SWCommand {
|
||||||
public BugCommand() {
|
public BugCommand() {
|
||||||
super("bug", null);
|
super("bug", null);
|
||||||
|
@ -3,6 +3,8 @@ package de.steamwar.bungeecore.commands;
|
|||||||
import de.steamwar.bungeecore.ServerStarter;
|
import de.steamwar.bungeecore.ServerStarter;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
@ -10,6 +12,7 @@ import java.io.File;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class BuilderCloudCommand extends SWCommand {
|
public class BuilderCloudCommand extends SWCommand {
|
||||||
|
|
||||||
private final Map<String, ServerStarter.Version> versionMap = new HashMap<>();
|
private final Map<String, ServerStarter.Version> versionMap = new HashMap<>();
|
||||||
|
@ -23,6 +23,9 @@ import de.steamwar.bungeecore.*;
|
|||||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
@ -30,6 +33,8 @@ import java.util.LinkedList;
|
|||||||
|
|
||||||
import static de.steamwar.bungeecore.Storage.challenges;
|
import static de.steamwar.bungeecore.Storage.challenges;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class ChallengeCommand extends SWCommand {
|
public class ChallengeCommand extends SWCommand {
|
||||||
|
|
||||||
public ChallengeCommand() {
|
public ChallengeCommand() {
|
||||||
|
@ -27,6 +27,9 @@ import de.steamwar.bungeecore.sql.SchematicNode;
|
|||||||
import de.steamwar.bungeecore.sql.SchematicType;
|
import de.steamwar.bungeecore.sql.SchematicType;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
@ -42,6 +45,8 @@ import java.util.*;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class CheckCommand extends SWCommand {
|
public class CheckCommand extends SWCommand {
|
||||||
private static Map<SchematicType, List<String>> checkQuestions = new HashMap<>();
|
private static Map<SchematicType, List<String>> checkQuestions = new HashMap<>();
|
||||||
private static Map<SchematicType, List<String>> ranks = new HashMap<>();
|
private static Map<SchematicType, List<String>> ranks = new HashMap<>();
|
||||||
|
@ -23,6 +23,8 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.bungeecore.sql.Punishment;
|
import de.steamwar.bungeecore.sql.Punishment;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.*;
|
import de.steamwar.command.*;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
@ -33,6 +35,7 @@ import java.net.InetSocketAddress;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class DevCommand extends SWCommand {
|
public class DevCommand extends SWCommand {
|
||||||
|
|
||||||
private final File devServerDir = new File("/configs/DevServer");
|
private final File devServerDir = new File("/configs/DevServer");
|
||||||
|
@ -25,6 +25,8 @@ import de.steamwar.bungeecore.sql.EventFight;
|
|||||||
import de.steamwar.bungeecore.sql.Team;
|
import de.steamwar.bungeecore.sql.Team;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
@ -36,6 +38,7 @@ import java.util.ListIterator;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class EventRescheduleCommand extends SWCommand {
|
public class EventRescheduleCommand extends SWCommand {
|
||||||
|
|
||||||
public EventRescheduleCommand() {
|
public EventRescheduleCommand() {
|
||||||
|
@ -21,8 +21,11 @@ package de.steamwar.bungeecore.commands;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.sql.EventFight;
|
import de.steamwar.bungeecore.sql.EventFight;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class EventreloadCommand extends SWCommand {
|
public class EventreloadCommand extends SWCommand {
|
||||||
public EventreloadCommand() {
|
public EventreloadCommand() {
|
||||||
super("eventreload", "bungeecore.softreload");
|
super("eventreload", "bungeecore.softreload");
|
||||||
|
@ -25,6 +25,8 @@ import de.steamwar.bungeecore.inventory.SWItem;
|
|||||||
import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker;
|
import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker;
|
||||||
import de.steamwar.bungeecore.sql.Punishment;
|
import de.steamwar.bungeecore.sql.Punishment;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.ChatMessageType;
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
@ -44,6 +46,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|||||||
* Sollte die Map fehlen, kann sie mit getMap() bestimmt werden.
|
* Sollte die Map fehlen, kann sie mit getMap() bestimmt werden.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class FightCommand extends SWCommand {
|
public class FightCommand extends SWCommand {
|
||||||
|
|
||||||
public FightCommand() {
|
public FightCommand() {
|
||||||
|
@ -5,6 +5,8 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.bungeecore.sql.Statement;
|
import de.steamwar.bungeecore.sql.Statement;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -13,6 +15,7 @@ import java.io.*;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class GDPRQuery extends SWCommand {
|
public class GDPRQuery extends SWCommand {
|
||||||
|
|
||||||
public GDPRQuery() {
|
public GDPRQuery() {
|
||||||
|
@ -24,9 +24,14 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.bungeecore.ServerStarter;
|
import de.steamwar.bungeecore.ServerStarter;
|
||||||
import de.steamwar.bungeecore.Subserver;
|
import de.steamwar.bungeecore.Subserver;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class HistoricCommand extends SWCommand {
|
public class HistoricCommand extends SWCommand {
|
||||||
public HistoricCommand() {
|
public HistoricCommand() {
|
||||||
super("historic", null);
|
super("historic", null);
|
||||||
|
@ -25,12 +25,15 @@ import de.steamwar.bungeecore.sql.SteamwarUser;
|
|||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.SWCommandUtils;
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class IgnoreCommand extends SWCommand {
|
public class IgnoreCommand extends SWCommand {
|
||||||
|
|
||||||
public IgnoreCommand() {
|
public IgnoreCommand() {
|
||||||
|
@ -24,6 +24,8 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.SWCommandUtils;
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
@ -31,6 +33,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class KickCommand extends SWCommand {
|
public class KickCommand extends SWCommand {
|
||||||
|
|
||||||
public KickCommand() {
|
public KickCommand() {
|
||||||
|
@ -23,6 +23,8 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.bungeecore.Servertype;
|
import de.steamwar.bungeecore.Servertype;
|
||||||
import de.steamwar.bungeecore.Subserver;
|
import de.steamwar.bungeecore.Subserver;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
@ -34,6 +36,7 @@ import java.util.List;
|
|||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class ListCommand extends SWCommand {
|
public class ListCommand extends SWCommand {
|
||||||
|
|
||||||
public ListCommand() {
|
public ListCommand() {
|
||||||
|
@ -21,9 +21,12 @@ package de.steamwar.bungeecore.commands;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.listeners.ChatListener;
|
import de.steamwar.bungeecore.listeners.ChatListener;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class LocalCommand extends SWCommand {
|
public class LocalCommand extends SWCommand {
|
||||||
|
|
||||||
public LocalCommand() {
|
public LocalCommand() {
|
||||||
|
@ -22,6 +22,8 @@ package de.steamwar.bungeecore.commands;
|
|||||||
import de.steamwar.bungeecore.listeners.ChatListener;
|
import de.steamwar.bungeecore.listeners.ChatListener;
|
||||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
@ -29,6 +31,7 @@ import java.util.stream.Stream;
|
|||||||
|
|
||||||
import static de.steamwar.bungeecore.Storage.lastChats;
|
import static de.steamwar.bungeecore.Storage.lastChats;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class MsgCommand extends SWCommand {
|
public class MsgCommand extends SWCommand {
|
||||||
|
|
||||||
public MsgCommand() {
|
public MsgCommand() {
|
||||||
|
@ -21,8 +21,11 @@ package de.steamwar.bungeecore.commands;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class PingCommand extends SWCommand {
|
public class PingCommand extends SWCommand {
|
||||||
|
|
||||||
public PingCommand() {
|
public PingCommand() {
|
||||||
|
@ -22,6 +22,8 @@ package de.steamwar.bungeecore.commands;
|
|||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import org.apache.commons.lang3.LocaleUtils;
|
import org.apache.commons.lang3.LocaleUtils;
|
||||||
@ -30,6 +32,7 @@ import java.text.DecimalFormat;
|
|||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class PlaytimeCommand extends SWCommand {
|
public class PlaytimeCommand extends SWCommand {
|
||||||
|
|
||||||
public PlaytimeCommand() {
|
public PlaytimeCommand() {
|
||||||
|
@ -25,8 +25,11 @@ import de.steamwar.bungeecore.sql.PollAnswer;
|
|||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class PollCommand extends SWCommand {
|
public class PollCommand extends SWCommand {
|
||||||
|
|
||||||
public PollCommand() {
|
public PollCommand() {
|
||||||
|
@ -24,10 +24,13 @@ import de.steamwar.bungeecore.listeners.PollSystem;
|
|||||||
import de.steamwar.bungeecore.sql.PollAnswer;
|
import de.steamwar.bungeecore.sql.PollAnswer;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class PollresultCommand extends SWCommand {
|
public class PollresultCommand extends SWCommand {
|
||||||
|
|
||||||
public PollresultCommand() {
|
public PollresultCommand() {
|
||||||
|
@ -20,10 +20,13 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import static de.steamwar.bungeecore.Storage.lastChats;
|
import static de.steamwar.bungeecore.Storage.lastChats;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class RCommand extends SWCommand {
|
public class RCommand extends SWCommand {
|
||||||
|
|
||||||
public RCommand() {
|
public RCommand() {
|
||||||
|
@ -26,6 +26,8 @@ import de.steamwar.bungeecore.sql.UserElo;
|
|||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.SWCommandUtils;
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -33,6 +35,7 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class RankCommand extends SWCommand {
|
public class RankCommand extends SWCommand {
|
||||||
|
|
||||||
public RankCommand() {
|
public RankCommand() {
|
||||||
|
@ -21,9 +21,12 @@ package de.steamwar.bungeecore.commands;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class RegelnCommand extends SWCommand {
|
public class RegelnCommand extends SWCommand {
|
||||||
public RegelnCommand() {
|
public RegelnCommand() {
|
||||||
super("regeln", null, "rules");
|
super("regeln", null, "rules");
|
||||||
|
@ -28,6 +28,9 @@ import de.steamwar.bungeecore.sql.Punishment;
|
|||||||
import de.steamwar.bungeecore.sql.SchematicType;
|
import de.steamwar.bungeecore.sql.SchematicType;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -36,6 +39,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class ReplayCommand extends SWCommand {
|
public class ReplayCommand extends SWCommand {
|
||||||
|
|
||||||
public ReplayCommand() {
|
public ReplayCommand() {
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
@ -21,9 +21,12 @@ package de.steamwar.bungeecore.commands;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.listeners.ChatListener;
|
import de.steamwar.bungeecore.listeners.ChatListener;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class ServerTeamchatCommand extends SWCommand {
|
public class ServerTeamchatCommand extends SWCommand {
|
||||||
|
|
||||||
public ServerTeamchatCommand() {
|
public ServerTeamchatCommand() {
|
||||||
|
@ -20,11 +20,14 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class SetLocaleCommand extends SWCommand {
|
public class SetLocaleCommand extends SWCommand {
|
||||||
|
|
||||||
public SetLocaleCommand() {
|
public SetLocaleCommand() {
|
||||||
|
@ -22,6 +22,8 @@ package de.steamwar.bungeecore.commands;
|
|||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.Node;
|
import de.steamwar.bungeecore.Node;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -29,6 +31,7 @@ import java.io.InputStreamReader;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class StatCommand extends SWCommand {
|
public class StatCommand extends SWCommand {
|
||||||
|
|
||||||
public StatCommand() {
|
public StatCommand() {
|
||||||
|
@ -21,9 +21,12 @@ package de.steamwar.bungeecore.commands;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.listeners.ChatListener;
|
import de.steamwar.bungeecore.listeners.ChatListener;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class TeamchatCommand extends BasicCommand {
|
public class TeamchatCommand extends BasicCommand {
|
||||||
|
|
||||||
public TeamchatCommand() {
|
public TeamchatCommand() {
|
||||||
|
@ -28,6 +28,9 @@ import de.steamwar.bungeecore.sql.SteamwarUser;
|
|||||||
import de.steamwar.bungeecore.sql.Tutorial;
|
import de.steamwar.bungeecore.sql.Tutorial;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
@ -39,6 +42,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class TutorialCommand extends SWCommand {
|
public class TutorialCommand extends SWCommand {
|
||||||
|
|
||||||
public TutorialCommand() {
|
public TutorialCommand() {
|
||||||
|
@ -23,8 +23,11 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class UnIgnoreCommand extends SWCommand {
|
public class UnIgnoreCommand extends SWCommand {
|
||||||
|
|
||||||
public UnIgnoreCommand() {
|
public UnIgnoreCommand() {
|
||||||
|
@ -24,11 +24,14 @@ import de.steamwar.bungeecore.Message;
|
|||||||
import de.steamwar.bungeecore.bot.AuthManager;
|
import de.steamwar.bungeecore.bot.AuthManager;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.dv8tion.jda.api.entities.Member;
|
import net.dv8tion.jda.api.entities.Member;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class VerifyCommand extends SWCommand {
|
public class VerifyCommand extends SWCommand {
|
||||||
|
|
||||||
public VerifyCommand() {
|
public VerifyCommand() {
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
@ -27,6 +30,8 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
|
@EventMode(EventMode.Mode.NonEvent)
|
||||||
public class WebpasswordCommand extends SWCommand {
|
public class WebpasswordCommand extends SWCommand {
|
||||||
|
|
||||||
public WebpasswordCommand() {
|
public WebpasswordCommand() {
|
||||||
|
@ -27,6 +27,8 @@ import de.steamwar.bungeecore.sql.Team;
|
|||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.SWCommandUtils;
|
import de.steamwar.command.SWCommandUtils;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.Command;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
@ -41,6 +43,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Linked(Command.class)
|
||||||
public class WhoisCommand extends SWCommand {
|
public class WhoisCommand extends SWCommand {
|
||||||
public WhoisCommand() {
|
public WhoisCommand() {
|
||||||
super("whois", "bungeecore.teamchat");
|
super("whois", "bungeecore.teamchat");
|
||||||
|
@ -25,6 +25,8 @@ import de.steamwar.bungeecore.listeners.mods.Forge;
|
|||||||
import de.steamwar.bungeecore.sql.BannedUserIPs;
|
import de.steamwar.bungeecore.sql.BannedUserIPs;
|
||||||
import de.steamwar.bungeecore.sql.Punishment;
|
import de.steamwar.bungeecore.sql.Punishment;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
@ -33,13 +35,15 @@ import net.md_5.bungee.api.chat.HoverEvent;
|
|||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.LoginEvent;
|
import net.md_5.bungee.api.event.LoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BanListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class BanListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLogin(LoginEvent event) {
|
public void onLogin(LoginEvent event) {
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is a part of the SteamWar software.
|
|
||||||
|
|
||||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
|
||||||
import net.md_5.bungee.api.plugin.Listener;
|
|
||||||
|
|
||||||
public abstract class BasicListener implements Listener {
|
|
||||||
|
|
||||||
public BasicListener(){
|
|
||||||
ProxyServer.getInstance().getPluginManager().registerListener(BungeeCore.get(), this);
|
|
||||||
}
|
|
||||||
}
|
|
@ -19,12 +19,16 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.LinkageType;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
import io.netty.buffer.ByteBufAllocator;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
import net.md_5.bungee.protocol.DefinedPacket;
|
import net.md_5.bungee.protocol.DefinedPacket;
|
||||||
|
|
||||||
@ -32,7 +36,8 @@ import java.net.InetAddress;
|
|||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
|
|
||||||
public class BrandListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class BrandListener implements Listener {
|
||||||
|
|
||||||
private static boolean isLocalHost(InetAddress addr) {
|
private static boolean isLocalHost(InetAddress addr) {
|
||||||
if (addr.isAnyLocalAddress() || addr.isLoopbackAddress()) {
|
if (addr.isAnyLocalAddress() || addr.isLoopbackAddress()) {
|
||||||
|
@ -19,28 +19,40 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.*;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
|
import de.steamwar.bungeecore.Message;
|
||||||
|
import de.steamwar.bungeecore.Servertype;
|
||||||
|
import de.steamwar.bungeecore.Subserver;
|
||||||
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
||||||
import de.steamwar.bungeecore.network.NetworkSender;
|
import de.steamwar.bungeecore.network.NetworkSender;
|
||||||
import de.steamwar.bungeecore.sql.*;
|
import de.steamwar.bungeecore.sql.*;
|
||||||
import de.steamwar.bungeecore.util.Chat19;
|
import de.steamwar.bungeecore.util.Chat19;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import de.steamwar.network.packets.server.PingPacket;
|
import de.steamwar.network.packets.server.PingPacket;
|
||||||
import net.md_5.bungee.api.*;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.ChatEvent;
|
import net.md_5.bungee.api.event.ChatEvent;
|
||||||
import net.md_5.bungee.api.event.TabCompleteEvent;
|
import net.md_5.bungee.api.event.TabCompleteEvent;
|
||||||
import net.md_5.bungee.api.event.TabCompleteResponseEvent;
|
import net.md_5.bungee.api.event.TabCompleteResponseEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.api.scheduler.TaskScheduler;
|
import net.md_5.bungee.api.scheduler.TaskScheduler;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
public class ChatListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class ChatListener implements Listener {
|
||||||
|
|
||||||
private static final Set<Integer> coloredTeams = new HashSet<>();
|
private static final Set<Integer> coloredTeams = new HashSet<>();
|
||||||
static {
|
static {
|
||||||
|
@ -19,21 +19,28 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.*;
|
import de.steamwar.bungeecore.Bauserver;
|
||||||
|
import de.steamwar.bungeecore.Message;
|
||||||
|
import de.steamwar.bungeecore.Servertype;
|
||||||
|
import de.steamwar.bungeecore.Subserver;
|
||||||
import de.steamwar.bungeecore.commands.CheckCommand;
|
import de.steamwar.bungeecore.commands.CheckCommand;
|
||||||
import de.steamwar.bungeecore.sql.SchematicNode;
|
import de.steamwar.bungeecore.sql.SchematicNode;
|
||||||
import de.steamwar.bungeecore.sql.SchematicType;
|
import de.steamwar.bungeecore.sql.SchematicType;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class CheckListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class CheckListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoin(PostLoginEvent e){
|
public void onPlayerJoin(PostLoginEvent e){
|
||||||
|
@ -30,6 +30,8 @@ import de.steamwar.bungeecore.commands.CheckCommand;
|
|||||||
import de.steamwar.bungeecore.commands.MsgCommand;
|
import de.steamwar.bungeecore.commands.MsgCommand;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.bungeecore.sql.UserGroup;
|
import de.steamwar.bungeecore.sql.UserGroup;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.AbstractReconnectHandler;
|
import net.md_5.bungee.api.AbstractReconnectHandler;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
@ -39,11 +41,13 @@ import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
|||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
import net.md_5.bungee.api.event.ServerDisconnectEvent;
|
import net.md_5.bungee.api.event.ServerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.event.ServerKickEvent;
|
import net.md_5.bungee.api.event.ServerKickEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class ConnectionListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class ConnectionListener implements Listener {
|
||||||
|
|
||||||
private static final String ADMIN_GROUP = "admin";
|
private static final String ADMIN_GROUP = "admin";
|
||||||
public static final String TEAM_GROUP = "team";
|
public static final String TEAM_GROUP = "team";
|
||||||
|
@ -5,11 +5,17 @@ import de.steamwar.bungeecore.sql.Event;
|
|||||||
import de.steamwar.bungeecore.sql.EventFight;
|
import de.steamwar.bungeecore.sql.EventFight;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import de.steamwar.bungeecore.sql.TeamTeilnahme;
|
import de.steamwar.bungeecore.sql.TeamTeilnahme;
|
||||||
|
import de.steamwar.linkage.EventMode;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
public class EventModeListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
@EventMode(EventMode.Mode.EventOnly)
|
||||||
|
public class EventModeListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPostLogin(PostLoginEvent e) {
|
public void onPostLogin(PostLoginEvent e) {
|
||||||
|
@ -19,17 +19,24 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.sql.PollAnswer;
|
import de.steamwar.bungeecore.sql.PollAnswer;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PollSystem extends BasicListener {
|
public class PollSystem implements Listener {
|
||||||
|
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getPluginManager().registerListener(BungeeCore.get(), this);
|
||||||
|
}
|
||||||
|
|
||||||
private static String question;
|
private static String question;
|
||||||
private static List<String> answers;
|
private static List<String> answers;
|
||||||
|
@ -22,9 +22,12 @@ package de.steamwar.bungeecore.listeners;
|
|||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.sql.Session;
|
import de.steamwar.bungeecore.sql.Session;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@ -32,7 +35,8 @@ import java.time.Instant;
|
|||||||
|
|
||||||
import static de.steamwar.bungeecore.Storage.sessions;
|
import static de.steamwar.bungeecore.Storage.sessions;
|
||||||
|
|
||||||
public class SessionManager extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class SessionManager implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPostLogin(PostLoginEvent event){
|
public void onPostLogin(PostLoginEvent event){
|
||||||
|
@ -21,12 +21,16 @@ package de.steamwar.bungeecore.listeners;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.SettingsChangedEvent;
|
import net.md_5.bungee.api.event.SettingsChangedEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
public class SettingsChangedListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class SettingsChangedListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onSettingsChanged(SettingsChangedEvent event) {
|
public void onSettingsChanged(SettingsChangedEvent event) {
|
||||||
|
@ -19,8 +19,11 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.event.LoginEvent;
|
import net.md_5.bungee.api.event.LoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.connection.InitialHandler;
|
import net.md_5.bungee.connection.InitialHandler;
|
||||||
import net.md_5.bungee.connection.LoginResult;
|
import net.md_5.bungee.connection.LoginResult;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
@ -31,7 +34,8 @@ import java.lang.reflect.Field;
|
|||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class SubserverProtocolFixer extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class SubserverProtocolFixer implements Listener {
|
||||||
|
|
||||||
private final InetSocketAddress inetSocketAddress = new InetSocketAddress("127.127.127.127", 25565);
|
private final InetSocketAddress inetSocketAddress = new InetSocketAddress("127.127.127.127", 25565);
|
||||||
|
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package de.steamwar.bungeecore.listeners.mods;
|
package de.steamwar.bungeecore.listeners.mods;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
import net.md_5.bungee.protocol.packet.PluginMessage;
|
import net.md_5.bungee.protocol.packet.PluginMessage;
|
||||||
|
|
||||||
public class Badlion extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class Badlion implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPostLogin(PostLoginEvent event) {
|
public void onPostLogin(PostLoginEvent event) {
|
||||||
|
@ -26,14 +26,16 @@ import com.google.gson.JsonSyntaxException;
|
|||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.Storage;
|
import de.steamwar.bungeecore.Storage;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
|
||||||
import de.steamwar.bungeecore.sql.Mod;
|
import de.steamwar.bungeecore.sql.Mod;
|
||||||
import de.steamwar.bungeecore.sql.Punishment;
|
import de.steamwar.bungeecore.sql.Punishment;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@ -42,7 +44,8 @@ import java.util.*;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class Fabric extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class Fabric implements Listener {
|
||||||
|
|
||||||
private final Set<String> neededMods = new HashSet<>();
|
private final Set<String> neededMods = new HashSet<>();
|
||||||
|
|
||||||
|
@ -20,15 +20,15 @@
|
|||||||
package de.steamwar.bungeecore.listeners.mods;
|
package de.steamwar.bungeecore.listeners.mods;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
|
||||||
import de.steamwar.bungeecore.sql.Mod;
|
import de.steamwar.bungeecore.sql.Mod;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import io.netty.channel.ChannelPipeline;
|
import io.netty.channel.ChannelPipeline;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import net.md_5.bungee.api.connection.PendingConnection;
|
import net.md_5.bungee.api.connection.PendingConnection;
|
||||||
import net.md_5.bungee.api.event.LoginEvent;
|
import net.md_5.bungee.api.event.LoginEvent;
|
||||||
import net.md_5.bungee.api.event.ProxyPingEvent;
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.connection.InitialHandler;
|
import net.md_5.bungee.connection.InitialHandler;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
|
||||||
import net.md_5.bungee.netty.ChannelWrapper;
|
import net.md_5.bungee.netty.ChannelWrapper;
|
||||||
import net.md_5.bungee.netty.HandlerBoss;
|
import net.md_5.bungee.netty.HandlerBoss;
|
||||||
import net.md_5.bungee.netty.PacketHandler;
|
import net.md_5.bungee.netty.PacketHandler;
|
||||||
@ -41,7 +41,8 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class Forge extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class Forge implements Listener {
|
||||||
|
|
||||||
private static final String WRAPPER = "fml:loginwrapper";
|
private static final String WRAPPER = "fml:loginwrapper";
|
||||||
|
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
package de.steamwar.bungeecore.listeners.mods;
|
package de.steamwar.bungeecore.listeners.mods;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
|
||||||
import de.steamwar.bungeecore.sql.Mod;
|
import de.steamwar.bungeecore.sql.Mod;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.UnpooledByteBufAllocator;
|
import io.netty.buffer.UnpooledByteBufAllocator;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
@ -29,13 +30,15 @@ import net.md_5.bungee.api.connection.Connection;
|
|||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class Forge12 extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class Forge12 implements Listener {
|
||||||
private static final String FMLHS = "FML|HS";
|
private static final String FMLHS = "FML|HS";
|
||||||
private static final byte[] REGISTER;
|
private static final byte[] REGISTER;
|
||||||
private static final byte[] HELLO = new byte[]{0, 2, 0, 0, 0, 0};
|
private static final byte[] HELLO = new byte[]{0, 2, 0, 0, 0, 0};
|
||||||
|
@ -22,12 +22,14 @@ package de.steamwar.bungeecore.listeners.mods;
|
|||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.stream.JsonReader;
|
import com.google.gson.stream.JsonReader;
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
|
||||||
import de.steamwar.bungeecore.sql.Mod;
|
import de.steamwar.bungeecore.sql.Mod;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.Connection;
|
import net.md_5.bungee.api.connection.Connection;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -38,7 +40,8 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class LabyMod extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class LabyMod implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPluginMessageEvent(PluginMessageEvent event){
|
public void onPluginMessageEvent(PluginMessageEvent event){
|
||||||
|
@ -20,18 +20,21 @@
|
|||||||
package de.steamwar.bungeecore.listeners.mods;
|
package de.steamwar.bungeecore.listeners.mods;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.*;
|
import de.steamwar.bungeecore.*;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.connection.Connection;
|
import net.md_5.bungee.api.connection.Connection;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class ModLoaderBlocker extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class ModLoaderBlocker implements Listener {
|
||||||
|
|
||||||
private static final Set<String> BLOCKED_SERVER = new HashSet<>();
|
private static final Set<String> BLOCKED_SERVER = new HashSet<>();
|
||||||
|
|
||||||
|
@ -2,17 +2,20 @@ package de.steamwar.bungeecore.listeners.mods;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
|
||||||
import de.steamwar.bungeecore.sql.Mod;
|
import de.steamwar.bungeecore.sql.Mod;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.connection.Connection;
|
import net.md_5.bungee.api.connection.Connection;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class WorldDownloader extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class WorldDownloader implements Listener {
|
||||||
|
|
||||||
private static final Set<String> wdlTags = Collections.unmodifiableSet(
|
private static final Set<String> wdlTags = Collections.unmodifiableSet(
|
||||||
Sets.newHashSet("WDL|INIT", "wdl:init", "WDL|REQUEST", "wdl:request")
|
Sets.newHashSet("WDL|INIT", "wdl:init", "WDL|REQUEST", "wdl:request")
|
||||||
|
@ -19,11 +19,14 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners.ping;
|
package de.steamwar.bungeecore.listeners.ping;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import net.md_5.bungee.api.event.ProxyPingEvent;
|
import net.md_5.bungee.api.event.ProxyPingEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
public class PingListener extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class PingListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPing(ProxyPingEvent event) {
|
public void onPing(ProxyPingEvent event) {
|
||||||
|
@ -21,12 +21,14 @@ package de.steamwar.bungeecore.network;
|
|||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.commands.TeamCommand;
|
import de.steamwar.bungeecore.commands.TeamCommand;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
|
||||||
import de.steamwar.bungeecore.sql.SWException;
|
import de.steamwar.bungeecore.sql.SWException;
|
||||||
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import de.steamwar.network.packets.NetworkPacket;
|
import de.steamwar.network.packets.NetworkPacket;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.connection.Server;
|
import net.md_5.bungee.api.connection.Server;
|
||||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
import net.md_5.bungee.event.EventPriority;
|
import net.md_5.bungee.event.EventPriority;
|
||||||
|
|
||||||
@ -35,7 +37,8 @@ import java.util.Arrays;
|
|||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class NetworkReceiver extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
public class NetworkReceiver implements Listener {
|
||||||
|
|
||||||
private static final List<String> blockedTags = Arrays.asList("bungeecord:main", "BungeeCord", "sw:bridge");
|
private static final List<String> blockedTags = Arrays.asList("bungeecord:main", "BungeeCord", "sw:bridge");
|
||||||
|
|
||||||
|
@ -23,7 +23,10 @@ import de.steamwar.bungeecore.BungeeCore;
|
|||||||
import de.steamwar.bungeecore.Servertype;
|
import de.steamwar.bungeecore.Servertype;
|
||||||
import de.steamwar.bungeecore.Storage;
|
import de.steamwar.bungeecore.Storage;
|
||||||
import de.steamwar.bungeecore.Subserver;
|
import de.steamwar.bungeecore.Subserver;
|
||||||
import de.steamwar.bungeecore.listeners.BasicListener;
|
import de.steamwar.linkage.Linked;
|
||||||
|
import de.steamwar.linkage.api.Disable;
|
||||||
|
import de.steamwar.linkage.types.DisableLink;
|
||||||
|
import de.steamwar.linkage.types.ListenerLink;
|
||||||
import de.steamwar.network.packets.common.FightInfoPacket;
|
import de.steamwar.network.packets.common.FightInfoPacket;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
@ -31,12 +34,18 @@ import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|||||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||||
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
||||||
|
import net.md_5.bungee.api.plugin.Listener;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class TablistManager extends BasicListener {
|
@Linked(ListenerLink.class)
|
||||||
|
@Linked(DisableLink.class)
|
||||||
|
public class TablistManager implements Listener, Disable {
|
||||||
|
|
||||||
private static final Map<ServerInfo, FightInfoPacket> fightInfos = new HashMap<>();
|
private static final Map<ServerInfo, FightInfoPacket> fightInfos = new HashMap<>();
|
||||||
|
|
||||||
@ -78,6 +87,7 @@ public class TablistManager extends BasicListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void disable() {
|
public void disable() {
|
||||||
synchronized (tablists) {
|
synchronized (tablists) {
|
||||||
tablists.forEach((player, tablist) -> tablist.disable());
|
tablists.forEach((player, tablist) -> tablist.disable());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren