Return the trust of a Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 15 Dec 2010 04:46:58 +0000 (05:46 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 15 Dec 2010 04:46:58 +0000 (05:46 +0100)
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java

index c9c5f48..c4eac6c 100644 (file)
@@ -89,6 +89,9 @@ public class SoneAccessor extends ReflectionAccessor {
                        return core.isNewSone(sone);
                } else if (member.equals("locked")) {
                        return core.isLocked(sone);
+               } else if (member.equals("trust")) {
+                       Sone currentSone = (Sone) dataProvider.getData("currentSone");
+                       return core.getTrust(currentSone, sone);
                }
                return super.get(dataProvider, object, member);
        }