Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
BungeeKickMove
==============
MoveMeNow
----

This is a port of the known [MoveMeNow](https://www.spigotmc.org/resources/movemenow.17/)-Plugin from SpigotMC, to use on BungeeCord-Proxies. It will move a player, when he gets kicked, to a predefined other server on the proxy, based on a white/blacklist.
#### Configuration:
```yml
message: "%kickmsg%"
servername: "server2"
mode: whitelist
list:
- ban
- kick
```
> [!NOTE]
> Mode can either be blacklist or whitelist. In blacklist mode, player will always be moved to default server unless his kick message contains one of the words/phrases in list. In whitelist mode, he will always be kicked unless his kick message contains one of the phrases in list. The servername is the name of the server (in the bungee config) to kick to.
>
> Message is the message sent to the player when he switches server. It can be spanned over multiple lines using the following syntax:
> ```yml
> message: |
> "This is the first line"
> "%kickmsg%"
> "This is the third line"
> ```
> The `%kickmsg%` will be replaced by the reason the server kicked the user in the first place.
12 changes: 7 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
<version>1.2</version>
<repositories>
<repository>
<id>dev-cmc</id>
<url>http://nexus.cmc.im/content/groups/public/</url>
<id>bungeecord-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.7-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
Expand All @@ -33,8 +35,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package net.craftminecraft.bungee.movemenow;

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.plugin.Command;
import net.md_5.bungee.api.plugin.TabExecutor;
import java.util.ArrayList;

public class ReloadCommand extends Command {
public class ReloadCommand extends Command implements TabExecutor {
MoveMeNow plugin;

public ReloadCommand(MoveMeNow plugin) {
Expand All @@ -17,10 +18,19 @@ public ReloadCommand(MoveMeNow plugin) {
public void execute(CommandSender sender, String[] args) {
if (args.length != 1) {
sender.sendMessage(new TextComponent("Please use /mmn reload."));
return;
}
switch (args[0]) {
case "reload":
plugin.loadConfig();
if (args[0].equals("reload")) {
plugin.loadConfig();
sender.sendMessage(new TextComponent("Reloaded config!"));
}
}

@Override
public Iterable<String> onTabComplete(CommandSender sender, String[] args)
{
ArrayList<String> list = new ArrayList<>();
list.add("reload");
return list;
}
}