mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Language and canUse improvements
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user