Add WorldGuard hook/context

This commit is contained in:
Draycia committed 2020-07-27 21:44:34 -07:00
1 parent d5d066fcb6
commit 126df2c3e2
8 files changed
+97 -4

No files matched your search

@@ -20,7 +20,11 @@ public final class SimpleChatTowny extends JavaPlugin {
simpleChat = (SimpleChat) Bukkit.getPluginManager().getPlugin("SimpleChat");
simpleChat.getContextManager().register("towny-town", (context) -> {
return isInSameTown(context.getSender(), context.getTarget());
if ((context.getValue() instanceof Boolean) && ((Boolean) context.getValue())) {
return isInSameTown(context.getSender(), context.getTarget());
}
return true;
});
}