Get the session by entity, not by name

This commit is contained in:
Brokkonaut
2018-09-22 14:21:25 +02:00
parent 96c9b694b8
commit 7a8551d94f

View File

@@ -145,7 +145,7 @@ public class CommandsHandler implements CommandExecutor {
if (logblock.hasPermission(sender, "logblock.tools." + tool.name)) {
if (sender instanceof Player) {
final Player player = (Player) sender;
final Session session = Session.getSession(player.getName());
final Session session = Session.getSession(player);
final ToolData toolData = session.toolData.get(tool);
if (args.length == 1) {
if (logblock.hasPermission(player, "logblock.spawnTools")) {