Update: untested
This commit is contained in:
parent
03443104be
commit
b747a4bdff
10
pom.xml
10
pom.xml
@ -784,14 +784,6 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- FastUtil -->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>it.unimi.dsi</groupId>-->
|
|
||||||
<!-- <artifactId>fastutil-core</artifactId>-->
|
|
||||||
<!-- <version>8.5.12</version>-->
|
|
||||||
<!-- <scope>provided</scope>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
<!-- ConfigMe -->
|
<!-- ConfigMe -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.jalu</groupId>
|
<groupId>ch.jalu</groupId>
|
||||||
@ -806,7 +798,7 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- bStats metrics -->
|
<!-- bStats metrics -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
<artifactId>bstats-bukkit</artifactId>
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
|
|||||||
@ -43,6 +43,7 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
@ -395,6 +396,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
|
|
||||||
// Disabled correctly
|
// Disabled correctly
|
||||||
Consumer<String> infoLogMethod = logger == null ? getLogger()::info : logger::info;
|
Consumer<String> infoLogMethod = logger == null ? getLogger()::info : logger::info;
|
||||||
|
HandlerList.unregisterAll(this);
|
||||||
infoLogMethod.accept("AuthMe " + this.getDescription().getVersion() + " is unloaded successfully!");
|
infoLogMethod.accept("AuthMe " + this.getDescription().getVersion() + " is unloaded successfully!");
|
||||||
ConsoleLogger.closeFileWriter();
|
ConsoleLogger.closeFileWriter();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package fr.xephi.authme.listener;
|
|||||||
/* Inspired by DongShaoNB/BedrockPlayerSupport **/
|
/* Inspired by DongShaoNB/BedrockPlayerSupport **/
|
||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.api.v3.AuthMeApi;
|
import fr.xephi.authme.api.v3.AuthMeApi;
|
||||||
|
import fr.xephi.authme.events.RestoreSessionEvent;
|
||||||
import fr.xephi.authme.settings.properties.HooksSettings;
|
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||||
import fr.xephi.authme.settings.properties.SecuritySettings;
|
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -37,4 +38,15 @@ public class BedrockAutoLoginListener implements Listener {
|
|||||||
player.sendMessage("§a基岩版自动登录完成!");
|
player.sendMessage("§a基岩版自动登录完成!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* prevent sending duplicate messages */
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
|
public void onPlayerRestoreSession(RestoreSessionEvent event) {
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
String name = event.getPlayer().getName();
|
||||||
|
UUID uuid = event.getPlayer().getUniqueId();
|
||||||
|
if (isBedrockPlayer(uuid) && !authmeApi.isAuthenticated(player) && authmeApi.isRegistered(name)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,6 @@ public class LoginLocationFixListener implements Listener {
|
|||||||
materialPortal = Material.matchMaterial("NETHER_PORTAL");
|
materialPortal = Material.matchMaterial("NETHER_PORTAL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user