Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added object initialization logging

  • Loading branch information...
commit b1bcfe50096f005632336e924671630eabe335c6 1 parent 4ad5030
@t3hk0d3 t3hk0d3 authored
View
10 src/main/java/ru/tehkode/permissions/PermissionGroup.java
@@ -24,6 +24,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import ru.tehkode.permissions.events.PermissionEntityEvent;
/**
@@ -39,6 +40,15 @@ public PermissionGroup(String groupName, PermissionManager manager) {
super(groupName, manager);
}
+ @Override
+ public void initialize() {
+ super.initialize();
+
+ if (this.isDebug()) {
+ Logger.getLogger("Minecraft").info("[PermissionsEx] Group " + this.getName() + " initialized");
+ }
+ }
+
/**
* Return non-inherited group prefix.
* This means if a group don't have has own prefix
View
7 src/main/java/ru/tehkode/permissions/PermissionUser.java
@@ -25,6 +25,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import ru.tehkode.permissions.events.PermissionEntityEvent;
@@ -49,11 +50,17 @@ public PermissionUser(String playerName, PermissionManager manager) {
@Override
public void initialize() {
+ super.initialize();
+
if (this.manager.getBackend().isCreateUserRecords() && this.isVirtual()) {
this.setGroups(this.getGroups(null), null);
this.save();
}
+
+ if (this.isDebug()) {
+ Logger.getLogger("Minecraft").info("[PermissionsEx] User " + this.getName() + " initialized");
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.