mirror of
https://e.coding.net/circlecloud/MiaoLobby.git
synced 2025-11-25 03:46:02 +00:00
3
pom.xml
3
pom.xml
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pw.yumc</groupId>
|
<groupId>pw.yumc</groupId>
|
||||||
<artifactId>MiaoLobby</artifactId>
|
<artifactId>MiaoLobby</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.7</version>
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.name}</finalName>
|
<finalName>${project.name}</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<options>
|
<options>
|
||||||
|
<option>-repackageclasses \ʼ.ʽ.ʾ.${project.artifactId}</option>
|
||||||
<option>-keep class ${project.groupId}.${project.artifactId}.${project.artifactId}</option>
|
<option>-keep class ${project.groupId}.${project.artifactId}.${project.artifactId}</option>
|
||||||
</options>
|
</options>
|
||||||
<libs>
|
<libs>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class Util {
|
|||||||
private static Map<String, BukkitTask> tasks;
|
private static Map<String, BukkitTask> tasks;
|
||||||
|
|
||||||
public static void delayTp(final Player player) {
|
public static void delayTp(final Player player) {
|
||||||
|
if (player == null) { return; }
|
||||||
tasks.put(player.getName(), new BukkitRunnable() {
|
tasks.put(player.getName(), new BukkitRunnable() {
|
||||||
int delay = config.AutoTPDelay;
|
int delay = config.AutoTPDelay;
|
||||||
|
|
||||||
@@ -45,9 +46,11 @@ public class Util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void cancel(Player player) {
|
public static void cancel(Player player) {
|
||||||
BukkitTask task = tasks.get(player.getName());
|
if (player != null) {
|
||||||
if (task != null) {
|
BukkitTask task = tasks.get(player.getName());
|
||||||
task.cancel();
|
if (task != null) {
|
||||||
|
task.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import pw.yumc.MiaoLobby.Util;
|
|||||||
public class AuthMeHook extends Hook {
|
public class AuthMeHook extends Hook {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLogin(final LoginEvent e) {
|
public void onLogin(final LoginEvent e) {
|
||||||
Util.delayTp(e.getPlayer());
|
if (e.isLogin()) {
|
||||||
|
Util.delayTp(e.getPlayer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ import pw.yumc.MiaoLobby.Util;
|
|||||||
public class VBossAuthHook extends Hook {
|
public class VBossAuthHook extends Hook {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLogin(LoginEvent e) {
|
public void onLogin(LoginEvent e) {
|
||||||
Util.delayTp(e.getPlayer());
|
if (e.isLogin()) {
|
||||||
|
Util.delayTp(e.getPlayer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|||||||
Reference in New Issue
Block a user