From: David ‘Bombe’ Roden Date: Mon, 18 Oct 2010 14:02:20 +0000 (+0200) Subject: Add “isBlocked” property. X-Git-Tag: 0.1-RC1~231 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9d9ede6b0344ef1edf8af5bd32e59797d216b6c4;p=Sone.git Add “isBlocked” property. --- diff --git a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java index b45e140..dc4c0ab 100644 --- a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java @@ -56,6 +56,9 @@ public class SoneAccessor extends ReflectionAccessor { } else if (member.equals("isCurrent")) { Sone currentSone = (Sone) dataProvider.getData("currentSone"); return currentSone.equals(sone); + } else if (member.equals("isBlocked")) { + Sone currentSone = (Sone) dataProvider.getData("currentSone"); + return currentSone.isSoneBlocked(sone.getId()); } return super.get(dataProvider, object, member); }