diff --git a/core/src/main/java/com/griefcraft/modules/create/CreateModule.java b/core/src/main/java/com/griefcraft/modules/create/CreateModule.java index 0ea6d2add..77344e4f5 100644 --- a/core/src/main/java/com/griefcraft/modules/create/CreateModule.java +++ b/core/src/main/java/com/griefcraft/modules/create/CreateModule.java @@ -124,12 +124,12 @@ public void onBlockInteract(LWCBlockInteractEvent event) { Protection protection = null; if (protectionType.equals("public")) { - protection = physDb.registerProtection(block.getTypeId(), Protection.Type.PUBLIC, worldName, player.getUniqueId().toString(), "", blockX, blockY, blockZ); + protection = physDb.registerProtection(block.getTypeId(), Protection.Type.PUBLIC, worldName, player.getName(), "", blockX, blockY, blockZ); lwc.sendLocale(player, "protection.interact.create.finalize"); } else if (protectionType.equals("password")) { String password = lwc.encrypt(protectionData); - protection = physDb.registerProtection(block.getTypeId(), Protection.Type.PASSWORD, worldName, player.getUniqueId().toString(), password, blockX, blockY, blockZ); + protection = physDb.registerProtection(block.getTypeId(), Protection.Type.PASSWORD, worldName, player.getName(), password, blockX, blockY, blockZ); player.addAccessibleProtection(protection); lwc.sendLocale(player, "protection.interact.create.finalize"); @@ -137,7 +137,7 @@ public void onBlockInteract(LWCBlockInteractEvent event) { } else if (protectionType.equals("private") || protectionType.equals("donation")) { String[] rights = protectionData.split(" "); - protection = physDb.registerProtection(block.getTypeId(), Protection.Type.matchType(protectionType), worldName, player.getUniqueId().toString(), "", blockX, blockY, blockZ); + protection = physDb.registerProtection(block.getTypeId(), Protection.Type.matchType(protectionType), worldName, player.getName(), "", blockX, blockY, blockZ); lwc.sendLocale(player, "protection.interact.create.finalize"); lwc.processRightsModifications(player, protection, rights);