Language and canUse improvements

This commit is contained in:
Draycia committed 2020-07-01 02:50:23 -07:00
1 parent b6cca97104
commit 191eaa1b3a
8 files changed
+57 -9

No files matched your search

@@ -38,6 +38,19 @@ public class NationChatChannel extends SimpleChatChannel {
return false;
}
@Override
public boolean canPlayerUse(Player player) {
if (super.canPlayerUse(player)) {
try {
return TownyAPI.getInstance().getDataSource().getResident(player.getName()).hasNation();
} catch (NotRegisteredException e) {
e.printStackTrace();
}
}
return false;
}
public static NationChatChannel.Builder nationBuilder(String name) {
return new NationChatChannel.Builder(name);
}