├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── PULL_REQUEST_TEMPLATE.md
├── README.md
└── workflows
│ └── maven.yml
├── LICENSE
├── SECURITY.md
└── multichat
├── .classpath
├── .gitignore
├── .project
├── .settings
├── org.eclipse.jdt.core.prefs
└── org.eclipse.m2e.core.prefs
├── dependency-reduced-pom.xml
├── pom.xml
├── releases
├── 1.4
│ └── 1.4.0
│ │ ├── Pre-Release
│ │ ├── MultiChat 1.4 Pre-Release 1.jar
│ │ ├── MultiChat 1.4 Pre-Release 2.jar
│ │ └── MultiChat 1.4 Pre-Release 3.jar
│ │ └── Snapshots
│ │ ├── MultiChat 1.4 Snapshop 10.jar
│ │ ├── MultiChat 1.4 Snapshot 1.jar
│ │ ├── MultiChat 1.4 Snapshot 2.jar
│ │ ├── MultiChat 1.4 Snapshot 3.jar
│ │ ├── MultiChat 1.4 Snapshot 4.jar
│ │ ├── MultiChat 1.4 Snapshot 5.jar
│ │ ├── MultiChat 1.4 Snapshot 6.jar
│ │ ├── MultiChat 1.4 Snapshot 7.jar
│ │ ├── MultiChat 1.4 Snapshot 8.jar
│ │ └── MultiChat 1.4 Snapshot 9.jar
├── 1.5.1
│ └── multichat-1.5.1.jar
├── 1.5.2
│ └── Development
│ │ ├── multichat-1.5.2-dev-1.jar
│ │ ├── multichat-1.5.2-dev-2.jar
│ │ └── multichat-1.5.2-dev-3.jar
├── 1.6.1
│ ├── multichat-1.6.1-dev1.jar
│ ├── multichat-1.6.1-dev2.jar
│ ├── multichat-1.6.1-dev3.jar
│ ├── multichat-1.6.1-pre1.jar
│ ├── multichat-1.6.1-pre2.jar
│ ├── multichat-1.6.1-pre3.jar
│ └── multichat-1.6.1-pre4.jar
├── 1.6.2
│ ├── .gitignore
│ └── multichat-1.6.2.jar
├── 1.6
│ ├── development
│ │ ├── multichat-1.6-beta-1-dev1.jar
│ │ ├── multichat-1.6-beta-1-dev2.jar
│ │ ├── multichat-1.6-beta-1.jar
│ │ ├── multichat-1.6-beta-2-dev1.jar
│ │ ├── multichat-1.6-beta-2-dev2.jar
│ │ ├── multichat-1.6-beta-2-dev3.jar
│ │ ├── multichat-1.6-beta-2-dev4.jar
│ │ ├── multichat-1.6-beta-2-dev5.jar
│ │ ├── multichat-1.6-beta-2-dev6.jar
│ │ ├── multichat-1.6-beta-2-dev7.jar
│ │ ├── multichat-1.6-beta-2-dev8.jar
│ │ ├── multichat-1.6-beta-2.jar
│ │ ├── multichat-1.6-beta-3-dev1.jar
│ │ ├── multichat-1.6-beta-3-dev2.jar
│ │ ├── multichat-1.6-beta-3-dev3.jar
│ │ ├── multichat-1.6-beta-3-dev4.jar
│ │ ├── multichat-1.6-beta-3-dev5.jar
│ │ ├── multichat-1.6-beta-3.jar
│ │ ├── multichat-1.6-beta-4-dev1.jar
│ │ ├── multichat-1.6-beta-4-dev2.jar
│ │ ├── multichat-1.6-beta-4-dev3.jar
│ │ ├── multichat-1.6-beta-4-dev4.jar
│ │ ├── multichat-1.6-beta-4-dev5.jar
│ │ ├── multichat-1.6-beta-4-dev6.jar
│ │ ├── multichat-1.6-beta-4-dev7.jar
│ │ ├── multichat-1.6-beta-4-dev8.jar
│ │ ├── multichat-1.6-beta-4-dev9.jar
│ │ ├── multichat-1.6-beta-4.jar
│ │ ├── multichat-1.6-pre1.jar
│ │ ├── multichat-1.6-pre2-with-bridge-update.jar
│ │ ├── multichat-1.6-pre2.jar
│ │ ├── multichat-1.6-pre3.jar
│ │ ├── multichat-1.6-pre4.jar
│ │ ├── multichat-1.6-pre5.jar
│ │ ├── multichat-1.6-pre6-sponge-bug-fix.jar
│ │ ├── multichat-1.6-pre6.jar
│ │ ├── multichat-1.6-pre7-potentially-final-jar.jar
│ │ ├── multichat-1.6-pre7-v2-more-debug-messages.jar
│ │ └── multichat-1.6.jar
│ └── multichat-1.6.jar
├── 1.7.1
│ ├── multichat-1.7.1-debug-version.jar
│ ├── multichat-1.7.1-pre1.jar
│ └── multichat-1.7.1.jar
├── 1.7.4
│ └── multichat-1.7.4.jar
├── 1.7
│ ├── multichat-1.7-alpha-1.jar
│ ├── multichat-1.7-alpha-2.jar
│ ├── multichat-1.7-alpha-3.jar
│ ├── multichat-1.7-beta-1.jar
│ ├── multichat-1.7-beta-2.jar
│ ├── multichat-1.7-beta-3.jar
│ ├── multichat-1.7-pre-1.jar
│ ├── multichat-1.7-pre-2.jar
│ ├── multichat-1.7-pre-3.jar
│ └── multichat-1.7.jar
├── 1.8.1
│ ├── multichat-1.8.1-snapshot-2020.4.8.1.jar
│ └── multichat-1.8.1-special-debug.jar
├── 1.8.2
│ ├── multichat-1.8.2-pre.1.jar
│ ├── multichat-1.8.2-pre.2.jar
│ ├── multichat-1.8.2-pre.3.jar
│ ├── multichat-1.8.2-pre.4.jar
│ ├── multichat-1.8.2-pre.5.jar
│ ├── multichat-1.8.2-snapshot.20.4.17.1.jar
│ ├── multichat-1.8.2-snapshot.20.4.25.2.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.1.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.2.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.3.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.4.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.5.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.6.jar
│ ├── multichat-1.8.2-snapshot.20.4.26.7.jar
│ ├── multichat-1.8.2-snapshot.20.4.27.1.jar
│ ├── multichat-1.8.2-snapshot.20.4.27.2.jar
│ ├── multichat-1.8.2-snapshot.20.4.27.3.jar
│ └── multichat-1.8.2-snapshot.20.4.27.4.jar
├── 1.8
│ ├── multichat-1.8-alpha1.jar
│ ├── multichat-1.8-alpha10.jar
│ ├── multichat-1.8-alpha11.jar
│ ├── multichat-1.8-alpha12.jar
│ ├── multichat-1.8-alpha13.jar
│ ├── multichat-1.8-alpha14.jar
│ ├── multichat-1.8-alpha15.jar
│ ├── multichat-1.8-alpha16.jar
│ ├── multichat-1.8-alpha17.jar
│ ├── multichat-1.8-alpha18.jar
│ ├── multichat-1.8-alpha19.jar
│ ├── multichat-1.8-alpha2.jar
│ ├── multichat-1.8-alpha20.jar
│ ├── multichat-1.8-alpha3.jar
│ ├── multichat-1.8-alpha4.jar
│ ├── multichat-1.8-alpha5.jar
│ ├── multichat-1.8-alpha6.jar
│ ├── multichat-1.8-alpha7.jar
│ ├── multichat-1.8-alpha8.jar
│ ├── multichat-1.8-alpha9.jar
│ ├── multichat-1.8-beta-1.jar
│ ├── multichat-1.8-beta-2.jar
│ ├── multichat-1.8-beta-3.jar
│ ├── multichat-1.8-beta-4.jar
│ ├── multichat-1.8-pre-1.jar
│ ├── multichat-1.8-snapshot-1.1.jar
│ ├── multichat-1.8-snapshot-1.2.jar
│ ├── multichat-1.8-snapshot-1.3.jar
│ ├── multichat-1.8-snapshot-1.4.jar
│ ├── multichat-1.8-snapshot-2.1.jar
│ ├── multichat-1.8-snapshot-3.1.jar
│ ├── multichat-1.8-snapshot-3.2.jar
│ ├── multichat-1.8-snapshot-3.3.jar
│ ├── multichat-1.8-snapshot-3.4.jar
│ ├── multichat-1.8-snapshot-3.5.jar
│ ├── multichat-1.8-snapshot-3.6.jar
│ ├── multichat-1.8-snapshot-3.7.jar
│ ├── multichat-1.8-snapshot-3.8.jar
│ ├── multichat-1.8-snapshot-4.1.jar
│ ├── multichat-1.8-snapshot-4.10.jar
│ ├── multichat-1.8-snapshot-4.11.jar
│ ├── multichat-1.8-snapshot-4.12.jar
│ ├── multichat-1.8-snapshot-4.13.jar
│ ├── multichat-1.8-snapshot-4.14.jar
│ ├── multichat-1.8-snapshot-4.15.jar
│ ├── multichat-1.8-snapshot-4.16.jar
│ ├── multichat-1.8-snapshot-4.17.jar
│ ├── multichat-1.8-snapshot-4.2.jar
│ ├── multichat-1.8-snapshot-4.3.jar
│ ├── multichat-1.8-snapshot-4.4.jar
│ ├── multichat-1.8-snapshot-4.5.jar
│ ├── multichat-1.8-snapshot-4.6.jar
│ ├── multichat-1.8-snapshot-4.7.jar
│ ├── multichat-1.8-snapshot-4.8.jar
│ ├── multichat-1.8-snapshot-4.9.jar
│ ├── multichat-1.8-snapshot-5.1.jar
│ ├── multichat-1.8-snapshot-5.2.jar
│ └── multichat-1.8-snapshot-5.3.jar
├── 1.9.2
│ └── multichat-1.9.2-new-debug.jar
├── 1.9.3
│ ├── multichat-1.9.3-beta.1.jar
│ └── multichat-1.9.3-beta.2.jar
├── 1.9.5
│ ├── multichat-1.9.5-dev.1.jar
│ └── multichat-1.9.6.jar
└── 1.9
│ ├── multichat-1.9-beta.1.jar
│ ├── multichat-1.9-beta.2.jar
│ ├── multichat-1.9-beta.3.jar
│ ├── multichat-1.9-pre.1.jar
│ ├── multichat-1.9-pre.2.jar
│ ├── multichat-1.9-pre.3.jar
│ ├── multichat-1.9-pre.4.jar
│ ├── multichat-1.9-snapshot.20.4.28.1.jar
│ ├── multichat-1.9-snapshot.20.4.28.10.jar
│ ├── multichat-1.9-snapshot.20.4.28.11.jar
│ ├── multichat-1.9-snapshot.20.4.28.2.jar
│ ├── multichat-1.9-snapshot.20.4.28.3.jar
│ ├── multichat-1.9-snapshot.20.4.28.4.jar
│ ├── multichat-1.9-snapshot.20.4.28.5.jar
│ ├── multichat-1.9-snapshot.20.4.28.6.jar
│ ├── multichat-1.9-snapshot.20.4.28.7.jar
│ ├── multichat-1.9-snapshot.20.4.28.8.jar
│ └── multichat-1.9-snapshot.20.4.28.9.jar
└── src
└── main
├── java
├── com
│ └── olivermartin410
│ │ └── plugins
│ │ ├── TChatInfo.java
│ │ └── TGroupChatInfo.java
└── xyz
│ └── olivermartin
│ └── multichat
│ ├── bungee
│ ├── Announcements.java
│ ├── Bulletins.java
│ ├── BungeeComm.java
│ ├── CastControl.java
│ ├── Channel.java
│ ├── ChatControl.java
│ ├── ChatManipulation.java
│ ├── ChatModeManager.java
│ ├── CommandManager.java
│ ├── ConfigHandler.java
│ ├── ConfigManager.java
│ ├── ConsoleManager.java
│ ├── DebugManager.java
│ ├── Events.java
│ ├── GlobalChannel.java
│ ├── GroupManager.java
│ ├── LocalChannel.java
│ ├── MessageManager.java
│ ├── Metrics.java
│ ├── MultiChat.java
│ ├── MultiChatUtil.java
│ ├── PlayerMeta.java
│ ├── PlayerMetaManager.java
│ ├── PrivateMessageManager.java
│ ├── StaffChatManager.java
│ ├── TViewChat.java
│ ├── UUIDNameManager.java
│ ├── commands
│ │ ├── ACCCommand.java
│ │ ├── ACCommand.java
│ │ ├── AnnouncementCommand.java
│ │ ├── BulletinCommand.java
│ │ ├── CastCommand.java
│ │ ├── ChannelCommand.java
│ │ ├── ClearChatCommand.java
│ │ ├── DisplayCommand.java
│ │ ├── FreezeChatCommand.java
│ │ ├── GCCommand.java
│ │ ├── GlobalCommand.java
│ │ ├── GroupCommand.java
│ │ ├── GroupListCommand.java
│ │ ├── HelpMeCommand.java
│ │ ├── IgnoreCommand.java
│ │ ├── LocalCommand.java
│ │ ├── MCCCommand.java
│ │ ├── MCCommand.java
│ │ ├── MsgCommand.java
│ │ ├── MultiChatBypassCommand.java
│ │ ├── MultiChatCommand.java
│ │ ├── MultiChatExecuteCommand.java
│ │ ├── MuteCommand.java
│ │ ├── ReplyCommand.java
│ │ ├── SocialSpyCommand.java
│ │ ├── StaffListCommand.java
│ │ └── UseCastCommand.java
│ └── events
│ │ ├── PostBroadcastEvent.java
│ │ ├── PostGlobalChatEvent.java
│ │ └── PostStaffChatEvent.java
│ ├── common
│ └── database
│ │ ├── DatabaseManager.java
│ │ ├── DatabaseMode.java
│ │ ├── GenericPooledDatabase.java
│ │ ├── MySQLPooledDatabase.java
│ │ ├── SQLitePooledDatabase.java
│ │ └── SimpleConnection.java
│ ├── local
│ ├── common
│ │ ├── LocalBungeeCommunicationManager.java
│ │ ├── LocalChatManager.java
│ │ ├── LocalConsoleLogger.java
│ │ ├── LocalMetaManager.java
│ │ ├── LocalPlaceholderManager.java
│ │ ├── LocalProxyCommunicationManager.java
│ │ ├── LocalPseudoChannel.java
│ │ ├── MultiChatLocal.java
│ │ ├── MultiChatLocalPlatform.java
│ │ ├── MultiChatLocalPlayer.java
│ │ ├── commands
│ │ │ ├── MultiChatLocalCommand.java
│ │ │ ├── MultiChatLocalCommandSender.java
│ │ │ ├── NickCommand.java
│ │ │ ├── ProxyExecuteCommand.java
│ │ │ ├── RealnameCommand.java
│ │ │ └── UsernameCommand.java
│ │ ├── config
│ │ │ ├── LocalConfig.java
│ │ │ ├── LocalConfigManager.java
│ │ │ ├── LocalConfigStatus.java
│ │ │ └── RegexChannelForcer.java
│ │ ├── listeners
│ │ │ ├── LocalBungeeMessage.java
│ │ │ ├── LocalBungeeObjectMessage.java
│ │ │ ├── LocalLoginLogoutListener.java
│ │ │ ├── LocalWorldChangeListener.java
│ │ │ ├── chat
│ │ │ │ ├── LocalChatListenerHighest.java
│ │ │ │ ├── LocalChatListenerLowest.java
│ │ │ │ ├── LocalChatListenerMonitor.java
│ │ │ │ └── MultiChatLocalPlayerChatEvent.java
│ │ │ └── communication
│ │ │ │ ├── LocalActionListener.java
│ │ │ │ ├── LocalCastListener.java
│ │ │ │ ├── LocalIgnoreListener.java
│ │ │ │ ├── LocalPlayerActionListener.java
│ │ │ │ ├── LocalPlayerChannelListener.java
│ │ │ │ └── LocalPlayerMetaListener.java
│ │ └── storage
│ │ │ ├── LocalDataStore.java
│ │ │ ├── LocalDatabaseCredentials.java
│ │ │ ├── LocalDatabaseSetupManager.java
│ │ │ ├── LocalFileNameManager.java
│ │ │ ├── LocalFileSystemManager.java
│ │ │ ├── LocalNameManager.java
│ │ │ ├── LocalNameManagerMode.java
│ │ │ ├── LocalNicknameFile.java
│ │ │ └── LocalSQLNameManager.java
│ ├── spigot
│ │ ├── LocalSpigotChatManager.java
│ │ ├── LocalSpigotConfig.java
│ │ ├── LocalSpigotConsoleLogger.java
│ │ ├── LocalSpigotFileNameManager.java
│ │ ├── LocalSpigotMetaManager.java
│ │ ├── LocalSpigotNicknameFile.java
│ │ ├── LocalSpigotPlaceholderManager.java
│ │ ├── MultiChatLocalSpigotPlayer.java
│ │ ├── MultiChatLocalSpigotPlugin.java
│ │ ├── SpigotBungeeCommunicationManager.java
│ │ ├── commands
│ │ │ ├── MultiChatLocalSpigotCommand.java
│ │ │ ├── MultiChatLocalSpigotCommandSender.java
│ │ │ ├── SpigotNickCommand.java
│ │ │ ├── SpigotProxyExecuteCommand.java
│ │ │ ├── SpigotRealnameCommand.java
│ │ │ └── SpigotUsernameCommand.java
│ │ ├── hooks
│ │ │ ├── LocalSpigotPAPIHook.java
│ │ │ └── LocalSpigotVaultHook.java
│ │ └── listeners
│ │ │ ├── LocalSpigotLoginLogoutListener.java
│ │ │ ├── LocalSpigotWorldChangeListener.java
│ │ │ ├── SpigotBungeeMessage.java
│ │ │ ├── SpigotBungeeObjectMessage.java
│ │ │ ├── chat
│ │ │ ├── LocalSpigotChatListenerHighest.java
│ │ │ ├── LocalSpigotChatListenerLowest.java
│ │ │ ├── LocalSpigotChatListenerMonitor.java
│ │ │ └── MultiChatLocalSpigotPlayerChatEvent.java
│ │ │ └── communication
│ │ │ ├── LocalSpigotActionListener.java
│ │ │ ├── LocalSpigotCastListener.java
│ │ │ ├── LocalSpigotIgnoreListener.java
│ │ │ ├── LocalSpigotPlayerActionListener.java
│ │ │ ├── LocalSpigotPlayerChannelListener.java
│ │ │ └── LocalSpigotPlayerMetaListener.java
│ └── sponge
│ │ ├── LocalSpongeChatManager.java
│ │ ├── LocalSpongeConfig.java
│ │ ├── LocalSpongeConsoleLogger.java
│ │ ├── LocalSpongeFileNameManager.java
│ │ ├── LocalSpongeMetaManager.java
│ │ ├── LocalSpongeNicknameFile.java
│ │ ├── LocalSpongePlaceholderManager.java
│ │ ├── MultiChatLocalSpongePlayer.java
│ │ ├── MultiChatLocalSpongePlugin.java
│ │ ├── SpongeBungeeCommunicationManager.java
│ │ ├── commands
│ │ ├── MultiChatLocalSpongeCommand.java
│ │ ├── MultiChatLocalSpongeCommandSender.java
│ │ ├── SpongeNickCommand.java
│ │ ├── SpongeProxyExecuteCommand.java
│ │ ├── SpongeRealnameCommand.java
│ │ └── SpongeUsernameCommand.java
│ │ ├── hooks
│ │ └── LocalSpongePAPIHook.java
│ │ └── listeners
│ │ ├── LocalSpongeLoginLogoutListener.java
│ │ ├── LocalSpongeWorldChangeListener.java
│ │ ├── SpongeBungeeMessage.java
│ │ ├── SpongeBungeeObjectMessage.java
│ │ ├── SpongeGameReloadEvent.java
│ │ ├── chat
│ │ ├── LocalSpongeChatListenerHighest.java
│ │ ├── LocalSpongeChatListenerLowest.java
│ │ ├── LocalSpongeChatListenerMonitor.java
│ │ ├── MultiChatLocalSpongePlayerChatEvent.java
│ │ └── MultiChatMessageChannel.java
│ │ └── communication
│ │ ├── LocalSpongeActionListener.java
│ │ ├── LocalSpongeCastListener.java
│ │ ├── LocalSpongeIgnoreListener.java
│ │ ├── LocalSpongePlayerActionListener.java
│ │ ├── LocalSpongePlayerChannelListener.java
│ │ └── LocalSpongePlayerMetaListener.java
│ └── proxy
│ └── common
│ ├── MultiChatProxy.java
│ └── MultiChatProxyPlatform.java
└── resources
├── bungee.yml
├── chatcontrol.yml
├── chatcontrol_fr.yml
├── config.yml
├── config_fr.yml
├── joinmessages.yml
├── joinmessages_fr.yml
├── localconfig.yml
├── localconfig_fr.yml
├── messages.yml
├── messages_fr.yml
└── plugin.yml
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | MultiChat is a piece of software that has evolved from a simple staff chat plugin. It is entirely my own work to this point (19/09/2018) and I have always dictated the direction of the software.
2 |
3 | In the coming updates I am planning lots of new features, and some of them are quite large. I hence wanted to open the possibility for others to contribute to the plugin.
4 |
5 | Firstly, I will not accept random pull requests. If you want to add a feature to the plugin please speak to me first. I don't want MultiChat to become bloated with features that should belong elsewhere.
6 |
7 | Secondly, please understand the codebase of the plugin is not always well documented or even well designed in the first place. When I started MultiChat I barely knew how to program in Java, I have now completed nearly a whole Computer Science degree and know what I am doing. I am making a lot of progress in updating and refactoring the oldest parts of the plugin, but some areas are, frankly, horribly written. So please don't tell me that the plugin is badly coded, yes some areas aren't pretty to look at, but it works. And I am working hard to make the code as elegant as possible. If you want to help with this process then I would be open to pull requests which update older sections of code to reflect better industry standards.
8 |
9 | And finally, I just want to say I can be picky. I'm sorry, I won't deny it. If I look at what you've written and it isn't quite what I want, I will say so. I however will not outright reject things like that, I will look at it and figure out the best way to put it into the plugin. I am a bit protective of this plugin, so please try and make sure that your pull requests obey simple java coding practices and don't introduce any terrible bugs.
10 |
11 | I think thats all I want to say here for now...
12 |
13 | Please don't be put off from contributing by anything I've said here, I really do welcome almost anything!
14 |
15 | But for the best results, talk to me first before spending hours coding something I might not be too keen on.
16 |
17 | Thanks for supporting the plugin, and I look forward to your contributions!
18 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: MultiChat
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to notify us about an issue with the plugin
4 |
5 | ---
6 |
7 | **Describe the bug**
8 | A clear and concise description of what the bug is. Please make separate reports for different bugs!
9 |
10 | **Full startup log of affected servers**
11 | ```
12 | Paste the FULL startup log of Bungeecord / Spigot here depending on where the issue occurs
13 | ```
14 |
15 | **To Reproduce**
16 | Steps to reproduce the behavior:
17 | 1. Install a fresh copy of '....'
18 | 2. Start up version '....' of Bungeecord
19 | 3. Type command '....' in chat
20 | 4. See error
21 |
22 | **Expected behavior**
23 | A clear and concise description of what you expected to happen.
24 |
25 | **Screenshots**
26 | If applicable, add screenshots to help explain your problem.
27 |
28 | **Platform and Versions (please complete the following information):**
29 | - OS: [e.g. Windows 10]
30 | - Java Version: [e.g. Java 8]
31 | - MultiChat Version: [e.g. 1.5.2]
32 | - Proxy Version: [e.g. Bungeecord-1523, Waterfall-156]
33 | - Local Server Version: [e.g. craftbukkit234, spigot-1256, paperclip-456, spongevanilla-2456]
34 |
35 | **Additional context**
36 | Add any other context about the problem here.
37 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest a new feature or improvement for the plugin
4 |
5 | ---
6 |
7 | **Is your feature request related to a problem? Please describe.**
8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9 |
10 | **Describe the solution you'd like**
11 | A clear and concise description of what you want to happen.
12 |
13 | **Describe alternatives you've considered**
14 | A clear and concise description of any alternative solutions or features you've considered.
15 |
16 | **Additional context**
17 | Add any other context or screenshots about the feature request here.
18 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Please do not submit major pull requests without first discussing them with me. Contact me on Discord (https://discord.gg/PVreERC) or otherwise.
2 |
3 | # Description
4 |
5 | ## What, briefly, is the purpose of this pull request?
6 |
7 | ### Is this pull request related to an issue with the plugin?
8 |
9 | ## What is the status of this pull request? [e.g. In Development, Undergoing Final Testing, Ready]
10 |
11 | # Changes
12 |
13 | ## What currently existing parts of the plugin are affected by this pull request
14 |
15 | ## What new features are added to the plugin by this pull request
16 |
17 | # Standards
18 |
19 | ## Does this pull request adhere to basic Java coding standards?
20 |
21 | ## Is the pull request suitably javadoc'd? (E.g. Have you written detailed javadoc on all public methods)
22 |
23 | ## Does this pull request seem to stay true to the style used so far in the MultiChat code.
24 |
25 | This is not to say you MUST code exactly as I do. But programs should have consistency, both in the actual code, and in documentation.
26 | Some specific examples of 'style' choices in the MultiChat code are as follows:
27 |
28 | Curly braces should in general NOT be opened on their own line.
29 |
30 | E.g.
31 | ```java
32 | if ( ... ) {
33 | }
34 | ```
35 | NOT
36 | ```java
37 | if ( ... )
38 | {
39 | }
40 | ```
41 | Comments should be written where possible and should have a space after the //
42 |
43 | E.g.
44 | ```java
45 | // This is a comment
46 | ```
47 | NOT
48 | ```java
49 | //This is a comment
50 | ```
51 |
52 |
--------------------------------------------------------------------------------
/.github/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Development
4 | Welcome to the public code repository for MultiChat by Revilo410. (Oliver Martin)
5 |
6 | MultiChat is an advanced chat management system for Spigot/Bungeecord with over **20000** downloads.
7 |
8 | [Official Listing](https://www.spigotmc.org/resources/multichat.26204/)
9 |
10 | # Documentation
11 |
12 | [Click Here](https://github.com/MultiChat/Development/wiki) for the official wiki. This contains installation instructions as well as the full list of permission nodes.
13 |
14 | # Support
15 |
16 | Need support? Use the [GitHub Issues](https://github.com/MultiChat/Development/issues) tracking feature, or visit our [Discord](https://discord.gg/PVreERC)!
17 |
--------------------------------------------------------------------------------
/.github/workflows/maven.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Maven
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3 |
4 | name: Java CI with Maven
5 |
6 | on:
7 | push:
8 | branches: [ master ]
9 | pull_request:
10 | branches: [ master ]
11 |
12 | jobs:
13 | build:
14 |
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 | - name: Set up JDK 1.8
20 | uses: actions/setup-java@v1
21 | with:
22 | java-version: 1.8
23 | - name: Build with Maven
24 | run: mvn -B package --file multichat/pom.xml
25 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | MultiChat in general only supports the latest version of the plugin. Please note version 1.9.1 and lower are no longer supported.
6 |
7 | | Version | Supported |
8 | | ------- | ------------------ |
9 | | 1.9.2 | :white_check_mark: |
10 | | < 1.9.2 | :x: |
11 |
12 | ## Reporting a Vulnerability
13 |
14 | In order to report a security vulnerability, please contact me privately using Discord (Revilo#3969) or in some other way. I discourage the use of GitHub Issues tracking for reporting security vulnerabilities as this could then form a 'map' for a malicious user to target servers running outdated versions of the software.
15 |
--------------------------------------------------------------------------------
/multichat/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/multichat/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/multichat/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | multichat
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/multichat/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Pre-Release/MultiChat 1.4 Pre-Release 1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Pre-Release/MultiChat 1.4 Pre-Release 1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Pre-Release/MultiChat 1.4 Pre-Release 2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Pre-Release/MultiChat 1.4 Pre-Release 2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Pre-Release/MultiChat 1.4 Pre-Release 3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Pre-Release/MultiChat 1.4 Pre-Release 3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshop 10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshop 10.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.4/1.4.0/Snapshots/MultiChat 1.4 Snapshot 9.jar
--------------------------------------------------------------------------------
/multichat/releases/1.5.1/multichat-1.5.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.5.1/multichat-1.5.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.5.2/Development/multichat-1.5.2-dev-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.5.2/Development/multichat-1.5.2-dev-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.5.2/Development/multichat-1.5.2-dev-2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.5.2/Development/multichat-1.5.2-dev-2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.5.2/Development/multichat-1.5.2-dev-3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.5.2/Development/multichat-1.5.2-dev-3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-dev1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-dev1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-dev2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-dev2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-dev3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-dev3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-pre1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-pre1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-pre2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-pre2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-pre3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-pre3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.1/multichat-1.6.1-pre4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.1/multichat-1.6.1-pre4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6.2/.gitignore:
--------------------------------------------------------------------------------
1 | /multichat-1.6.2.jar.sig
2 |
--------------------------------------------------------------------------------
/multichat/releases/1.6.2/multichat-1.6.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6.2/multichat-1.6.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-1-dev1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-1-dev1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-1-dev2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-1-dev2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2-dev8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2-dev8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-3-dev1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-3-dev1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-3-dev2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-3-dev2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-3-dev3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-3-dev3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-3-dev4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-3-dev4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-3-dev5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-3-dev5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4-dev9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4-dev9.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-beta-4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-beta-4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre2-with-bridge-update.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre2-with-bridge-update.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre6-sponge-bug-fix.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre6-sponge-bug-fix.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre7-potentially-final-jar.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre7-potentially-final-jar.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6-pre7-v2-more-debug-messages.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6-pre7-v2-more-debug-messages.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/development/multichat-1.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/development/multichat-1.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.6/multichat-1.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.6/multichat-1.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7.1/multichat-1.7.1-debug-version.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7.1/multichat-1.7.1-debug-version.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7.1/multichat-1.7.1-pre1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7.1/multichat-1.7.1-pre1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7.1/multichat-1.7.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7.1/multichat-1.7.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7.4/multichat-1.7.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7.4/multichat-1.7.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-alpha-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-alpha-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-alpha-2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-alpha-2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-alpha-3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-alpha-3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-beta-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-beta-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-beta-2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-beta-2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-beta-3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-beta-3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-pre-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-pre-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-pre-2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-pre-2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7-pre-3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7-pre-3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.7/multichat-1.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.7/multichat-1.7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.1/multichat-1.8.1-snapshot-2020.4.8.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.1/multichat-1.8.1-snapshot-2020.4.8.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.1/multichat-1.8.1-special-debug.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.1/multichat-1.8.1-special-debug.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-pre.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-pre.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-pre.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-pre.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-pre.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-pre.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-pre.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-pre.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-pre.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-pre.5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.17.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.17.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.25.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.25.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.26.7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8.2/multichat-1.8.2-snapshot.20.4.27.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha10.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha11.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha12.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha12.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha13.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha13.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha14.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha15.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha16.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha16.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha17.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha18.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha18.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha19.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha19.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha20.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha20.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-alpha9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-alpha9.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-beta-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-beta-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-beta-2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-beta-2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-beta-3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-beta-3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-beta-4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-beta-4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-pre-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-pre-1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-1.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-1.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-1.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-1.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-1.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-2.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-3.8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-3.8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.10.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.11.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.12.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.12.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.13.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.13.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.14.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.15.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.16.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.16.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.17.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-4.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-4.9.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-5.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-5.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-5.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-5.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.8/multichat-1.8-snapshot-5.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.8/multichat-1.8-snapshot-5.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9.2/multichat-1.9.2-new-debug.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9.2/multichat-1.9.2-new-debug.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9.3/multichat-1.9.3-beta.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9.3/multichat-1.9.3-beta.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9.3/multichat-1.9.3-beta.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9.3/multichat-1.9.3-beta.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9.5/multichat-1.9.5-dev.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9.5/multichat-1.9.5-dev.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9.5/multichat-1.9.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9.5/multichat-1.9.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-beta.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-beta.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-beta.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-beta.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-beta.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-beta.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-pre.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-pre.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-pre.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-pre.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-pre.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-pre.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-pre.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-pre.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.1.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.10.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.11.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.2.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.3.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.4.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.5.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.6.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.7.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.8.jar
--------------------------------------------------------------------------------
/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/releases/1.9/multichat-1.9-snapshot.20.4.28.9.jar
--------------------------------------------------------------------------------
/multichat/src/main/java/com/olivermartin410/plugins/TChatInfo.java:
--------------------------------------------------------------------------------
1 | package com.olivermartin410.plugins;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Chat Info Class
7 | *
Used to store information about chat info for mod and admin chats
8 | *
9 | * @author Oliver Martin (Revilo410)
10 | *
11 | */
12 | public class TChatInfo implements Serializable {
13 |
14 | private static final long serialVersionUID = 1L;
15 | private char chatcolor;
16 | private char namecolor;
17 |
18 | public char getChatColor() {
19 | return this.chatcolor;
20 | }
21 |
22 | public void setChatColor(char color) {
23 | this.chatcolor = color;
24 | }
25 |
26 | public char getNameColor() {
27 | return this.namecolor;
28 | }
29 |
30 | public void setNameColor(char color) {
31 | this.namecolor = color;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/CastControl.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | import net.md_5.bungee.api.CommandSender;
7 |
8 | /**
9 | * Cast Control
10 | * Manages the creation, deletion and displaying of Custom broadcASTs (CASTs)
11 | *
12 | * @author Oliver Martin (Revilo410)
13 | *
14 | */
15 | public class CastControl {
16 |
17 | public static Map castList = new HashMap();
18 |
19 | public static void sendCast(String castName, String castMessage, Channel chatStream, CommandSender sender) {
20 | castMessage = ChatControl.applyChatRules(castMessage, "casts", "").get();
21 | chatStream.sendMessage(castList.get(castName.toLowerCase()) + " " + castMessage, sender);
22 | }
23 |
24 | public static void addCast(String castName, String castFormat) {
25 | castList.put(castName.toLowerCase(), MultiChatUtil.reformatRGB(castFormat));
26 | }
27 |
28 | public static void removeCast(String castName) {
29 | castList.remove(castName.toLowerCase());
30 | }
31 |
32 | public static boolean existsCast(String castName) {
33 | return castList.containsKey(castName.toLowerCase());
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/ConfigManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee;
2 |
3 |
4 | import java.io.File;
5 | import java.util.HashMap;
6 | import java.util.Map;
7 | import java.util.Optional;
8 |
9 | /**
10 | * Configuration Manager Class
11 | * Manages all access and creation of the config.yml file
12 | *
13 | * @author Oliver Martin (Revilo410)
14 | *
15 | */
16 | public class ConfigManager {
17 |
18 | private static ConfigManager instance;
19 |
20 | static {
21 |
22 | instance = new ConfigManager();
23 |
24 | }
25 |
26 | public static ConfigManager getInstance() {
27 | return instance;
28 | }
29 |
30 | // END OF STATIC
31 |
32 | private Map handlerMap;
33 |
34 | private ConfigManager() {
35 |
36 | handlerMap = new HashMap();
37 |
38 | }
39 |
40 | /**
41 | * Create a new configHandler for a given filename and path
42 | * @param fileName filename i.e. config.yml
43 | * @param configPath THE PATH WITHOUT THE FILE NAME
44 | */
45 | public void registerHandler(String fileName, File configPath) {
46 |
47 | handlerMap.put(fileName, new ConfigHandler(configPath, fileName));
48 |
49 | }
50 |
51 | public Optional getSafeHandler(String fileName) {
52 |
53 | if (handlerMap.containsKey(fileName)) {
54 | return Optional.of(handlerMap.get(fileName));
55 | }
56 |
57 | return Optional.empty();
58 |
59 | }
60 |
61 | public ConfigHandler getHandler(String fileName) {
62 |
63 | if (handlerMap.containsKey(fileName)) {
64 | return handlerMap.get(fileName);
65 | }
66 |
67 | return null;
68 |
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/DebugManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee;
2 |
3 | public class DebugManager {
4 |
5 | private static boolean debug;
6 |
7 | static {
8 | debug = false;
9 | }
10 |
11 | public static void setDebug(boolean debug) {
12 | DebugManager.debug = debug;
13 | }
14 |
15 | public static void toggle() {
16 | debug = !debug;
17 | }
18 |
19 | public static void log(String message) {
20 | if (debug) ConsoleManager.log("[DEBUG] " + message);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/GlobalChannel.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee;
2 |
3 | public class GlobalChannel extends Channel {
4 |
5 | public GlobalChannel(String format) {
6 | super("global", format, false, false);
7 | }
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/LocalChannel.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.connection.ProxiedPlayer;
5 |
6 | public class LocalChannel extends Channel {
7 |
8 | public LocalChannel() {
9 | super("local", "", false, false);
10 | }
11 |
12 | /**
13 | * This has no purpose as local chat for players is handled by the local servers
14 | */
15 | @Override
16 | public void sendMessage(ProxiedPlayer sender, String message, String format) {
17 | /* EMPTY */
18 | }
19 |
20 | @Override
21 | public void sendMessage(String message, CommandSender sender) {
22 |
23 | DebugManager.log("LocalChannel wants to send a cast message!");
24 |
25 | // Use this to relay CASTS to local chat!
26 | if (sender instanceof ProxiedPlayer) {
27 | BungeeComm.sendChatMessage(message, ((ProxiedPlayer)sender).getServer().getInfo());
28 | }
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/MultiChatUtil.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/bungee/MultiChatUtil.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/PlayerMeta.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/bungee/PlayerMeta.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/TViewChat.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee;
2 |
3 | import java.io.Serializable;
4 | import java.util.ArrayList;
5 | import java.util.List;
6 |
7 | /**
8 | * Viewed Chat Class
9 | * Class to represent the group chats a player is viewing, and what chat they have selected
10 | *
11 | * @author Oliver Martin (Revilo410)
12 | *
13 | */
14 | public class TViewChat implements Serializable {
15 |
16 | private static final long serialVersionUID = 1L;
17 | private List viewedchats = new ArrayList();
18 | private String selectedchat = new String();
19 |
20 | public List getViewed() {
21 | return this.viewedchats;
22 | }
23 |
24 | public void addViewed(String chat) {
25 | this.viewedchats.add(chat);
26 | }
27 |
28 | public boolean isViewing(String chat) {
29 |
30 | if (this.viewedchats.contains(chat)) {
31 | return true;
32 | }
33 |
34 | return false;
35 |
36 | }
37 |
38 | public void delViewed(String chat) {
39 | this.viewedchats.remove(chat);
40 | }
41 |
42 | public String getSelected() {
43 | return this.selectedchat;
44 | }
45 |
46 | public void setSelected(String chat) {
47 | this.selectedchat = chat;
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/FreezeChatCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.ProxyServer;
5 | import net.md_5.bungee.api.connection.ProxiedPlayer;
6 | import net.md_5.bungee.api.plugin.Command;
7 | import xyz.olivermartin.multichat.bungee.MessageManager;
8 | import xyz.olivermartin.multichat.bungee.MultiChat;
9 |
10 | /**
11 | * Freeze Chat Command
12 | * Allows staff members to block all chat messages being sent
13 | *
14 | * @author Oliver Martin (Revilo410)
15 | *
16 | */
17 | public class FreezeChatCommand extends Command {
18 |
19 | private static String[] aliases = new String[] {};
20 |
21 | public FreezeChatCommand() {
22 | super("freezechat", "multichat.chat.freeze", aliases);
23 | }
24 |
25 | public void execute(CommandSender sender, String[] args) {
26 |
27 | if (MultiChat.frozen == true) {
28 |
29 | for (ProxiedPlayer onlineplayer : ProxyServer.getInstance().getPlayers()) {
30 | MessageManager.sendSpecialMessage(onlineplayer, "command_freezechat_thawed", sender.getName());
31 | }
32 |
33 | MultiChat.frozen = false;
34 |
35 | } else {
36 |
37 | for (ProxiedPlayer onlineplayer : ProxyServer.getInstance().getPlayers()) {
38 | MessageManager.sendSpecialMessage(onlineplayer, "command_freezechat_frozen", sender.getName());
39 | }
40 |
41 | MultiChat.frozen = true;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/GroupListCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.plugin.Command;
5 | import xyz.olivermartin.multichat.bungee.MessageManager;
6 | import xyz.olivermartin.multichat.bungee.MultiChat;
7 |
8 | /**
9 | * Group List Command
10 | * Displays a list of all current group chats on the server
11 | *
12 | * @author Oliver Martin (Revilo410)
13 | *
14 | */
15 | public class GroupListCommand extends Command {
16 |
17 | private static String[] aliases = new String[] {};
18 |
19 | public GroupListCommand() {
20 | super("groups", "multichat.staff.listgroups", aliases);
21 | }
22 |
23 | public void execute(CommandSender sender, String[] args) {
24 |
25 | MessageManager.sendMessage(sender, "command_grouplist_list");
26 |
27 | for (String groupname : MultiChat.groupchats.keySet()) {
28 | MessageManager.sendSpecialMessage(sender, "command_grouplist_list_item", groupname);
29 | }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/HelpMeCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import java.util.Optional;
4 |
5 | import net.md_5.bungee.api.CommandSender;
6 | import net.md_5.bungee.api.ProxyServer;
7 | import net.md_5.bungee.api.connection.ProxiedPlayer;
8 | import net.md_5.bungee.api.plugin.Command;
9 | import xyz.olivermartin.multichat.bungee.ChatControl;
10 | import xyz.olivermartin.multichat.bungee.ConsoleManager;
11 | import xyz.olivermartin.multichat.bungee.MessageManager;
12 | import xyz.olivermartin.multichat.bungee.MultiChatUtil;
13 |
14 | /**
15 | * 'Help Me' Command
16 | * Allows players to request help from all online staff members
17 | *
18 | * @author Oliver Martin (Revilo410)
19 | *
20 | */
21 | public class HelpMeCommand extends Command {
22 |
23 | private static String[] aliases = new String[] {};
24 |
25 | public HelpMeCommand() {
26 | super("helpme", "multichat.chat.helpme", aliases);
27 | }
28 |
29 | public void execute(CommandSender sender, String[] args) {
30 |
31 | if ( sender instanceof ProxiedPlayer ) {
32 |
33 | if (args.length < 1) {
34 |
35 | MessageManager.sendMessage(sender, "command_helpme_desc");
36 | MessageManager.sendMessage(sender, "command_helpme_usage");
37 |
38 | } else {
39 |
40 | String message = MultiChatUtil.getMessageFromArgs(args);
41 |
42 | if ( sendMessage(sender.getName() + ": " + message, sender.getName()) ) {
43 | MessageManager.sendMessage(sender, "command_helpme_sent");
44 | }
45 |
46 | }
47 |
48 | } else {
49 | MessageManager.sendMessage(sender, "command_helpme_only_players");
50 | }
51 | }
52 |
53 | public static boolean sendMessage(String message, String username) {
54 |
55 | Optional crm;
56 |
57 | ProxiedPlayer potentialPlayer = ProxyServer.getInstance().getPlayer(username);
58 | if (potentialPlayer != null) {
59 | if (ChatControl.isMuted(potentialPlayer.getUniqueId(), "helpme")) {
60 | MessageManager.sendMessage(potentialPlayer, "mute_cannot_send_message");
61 | return false;
62 | }
63 |
64 | if (ChatControl.handleSpam(potentialPlayer, message, "helpme")) {
65 | return false;
66 | }
67 | }
68 |
69 | crm = ChatControl.applyChatRules(message, "helpme", username);
70 |
71 | if (crm.isPresent()) {
72 | message = crm.get();
73 | } else {
74 | return false;
75 | }
76 |
77 | for (ProxiedPlayer onlineplayer : ProxyServer.getInstance().getPlayers()) {
78 | if (onlineplayer.hasPermission("multichat.staff")) {
79 | MessageManager.sendSpecialMessage(onlineplayer, "command_helpme_format", message);
80 | }
81 | }
82 |
83 | ConsoleManager.logHelpMe(message);
84 |
85 | return true;
86 |
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/IgnoreCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.ProxyServer;
5 | import net.md_5.bungee.api.connection.ProxiedPlayer;
6 | import net.md_5.bungee.api.plugin.Command;
7 | import xyz.olivermartin.multichat.bungee.BungeeComm;
8 | import xyz.olivermartin.multichat.bungee.ChatControl;
9 | import xyz.olivermartin.multichat.bungee.ConfigManager;
10 | import xyz.olivermartin.multichat.bungee.MessageManager;
11 |
12 | public class IgnoreCommand extends Command {
13 |
14 | public IgnoreCommand() {
15 | super("ignore", "multichat.ignore", (String[])ConfigManager.getInstance().getHandler("chatcontrol.yml").getConfig().getStringList("ignorecommand").toArray(new String[0]));
16 | }
17 |
18 | @Override
19 | public void execute(CommandSender sender, String[] args) {
20 |
21 | if (args.length != 1) {
22 |
23 | MessageManager.sendMessage(sender, "ignore_usage");
24 |
25 | } else {
26 |
27 | if (sender instanceof ProxiedPlayer) {
28 |
29 | String username = args[0];
30 |
31 | ProxiedPlayer target = ProxyServer.getInstance().getPlayer(username);
32 |
33 | if (target != null) {
34 |
35 | if (target.getName().equals(sender.getName())) {
36 | MessageManager.sendMessage(sender, "ignore_cannot_ignore_yourself");
37 | return;
38 | }
39 |
40 | if (target.hasPermission("multichat.ignore.bypass")) {
41 | MessageManager.sendMessage(sender, "ignore_bypass");
42 | return;
43 | }
44 |
45 | if (!ChatControl.ignoresAnywhere(target.getUniqueId(), ((ProxiedPlayer) sender).getUniqueId())) {
46 | ChatControl.ignore(((ProxiedPlayer) sender).getUniqueId(), target.getUniqueId());
47 | MessageManager.sendSpecialMessage(sender, "ignore_ignored", target.getName());
48 | } else {
49 | ChatControl.unignore(((ProxiedPlayer) sender).getUniqueId(), target.getUniqueId());
50 | MessageManager.sendSpecialMessage(sender, "ignore_unignored", target.getName());
51 | }
52 |
53 | BungeeComm.sendIgnoreMap(((ProxiedPlayer) sender).getServer().getInfo());
54 |
55 | } else {
56 |
57 | MessageManager.sendMessage(sender, "ignore_player_not_found");
58 |
59 | }
60 |
61 | } else {
62 |
63 | MessageManager.sendMessage(sender, "ignore_only_players");
64 |
65 | }
66 |
67 | }
68 |
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/MCCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.connection.ProxiedPlayer;
5 | import net.md_5.bungee.api.plugin.Command;
6 | import xyz.olivermartin.multichat.bungee.Events;
7 | import xyz.olivermartin.multichat.bungee.MessageManager;
8 | import xyz.olivermartin.multichat.bungee.MultiChatUtil;
9 | import xyz.olivermartin.multichat.bungee.StaffChatManager;
10 |
11 | /**
12 | * Mod-Chat Commands
13 | * Allows staff members to send mod-chat messages or toggle the chat
14 | *
15 | * @author Oliver Martin (Revilo410)
16 | *
17 | */
18 | public class MCCommand extends Command {
19 |
20 | private static String[] aliases = new String[] {};
21 |
22 | public MCCommand() {
23 | super("mc", "multichat.staff.mod", aliases);
24 | }
25 |
26 | public void execute(CommandSender sender, String[] args) {
27 |
28 | boolean toggleresult;
29 |
30 | if (args.length < 1) {
31 |
32 | if ((sender instanceof ProxiedPlayer)) {
33 |
34 | ProxiedPlayer player = (ProxiedPlayer) sender;
35 | toggleresult = Events.toggleMC(player.getUniqueId());
36 |
37 | if (toggleresult == true) {
38 | MessageManager.sendMessage(sender, "command_mc_toggle_on");
39 | } else {
40 | MessageManager.sendMessage(sender, "command_mc_toggle_off");
41 | }
42 |
43 | } else {
44 | MessageManager.sendMessage(sender, "command_mc_only_players");
45 | }
46 |
47 | } else if ((sender instanceof ProxiedPlayer)) {
48 |
49 | String message = MultiChatUtil.getMessageFromArgs(args);
50 |
51 | ProxiedPlayer player = (ProxiedPlayer) sender;
52 |
53 | StaffChatManager chatman = new StaffChatManager();
54 | chatman.sendModMessage(player.getName(), player.getDisplayName(), player.getServer().getInfo().getName(), message);
55 | chatman = null;
56 |
57 | } else {
58 |
59 | String message = MultiChatUtil.getMessageFromArgs(args);
60 |
61 | StaffChatManager chatman = new StaffChatManager();
62 | chatman.sendModMessage("CONSOLE", "CONSOLE", "#", message);
63 | chatman = null;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/MultiChatBypassCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.connection.ProxiedPlayer;
5 | import net.md_5.bungee.api.plugin.Command;
6 | import xyz.olivermartin.multichat.bungee.ConfigManager;
7 | import xyz.olivermartin.multichat.bungee.Events;
8 | import xyz.olivermartin.multichat.bungee.MessageManager;
9 |
10 | public class MultiChatBypassCommand extends Command {
11 |
12 | public MultiChatBypassCommand() {
13 | super("multichatbypass", "multichat.bypass", ConfigManager.getInstance().getHandler("config.yml").getConfig().contains("multichatbypasscommand") ? (String[]) ConfigManager.getInstance().getHandler("config.yml").getConfig().getStringList("multichatbypasscommand").toArray(new String[0]) : new String[0]);
14 | }
15 |
16 | @Override
17 | public void execute(CommandSender sender, String[] args) {
18 |
19 | if (! (sender instanceof ProxiedPlayer)) {
20 | return;
21 | }
22 |
23 | ProxiedPlayer player = (ProxiedPlayer) sender;
24 |
25 | if (args.length >= 1) {
26 |
27 | MessageManager.sendMessage(sender, "command_multichatbypass_usage");
28 |
29 | } else {
30 |
31 | if (Events.mcbPlayers.contains(player.getUniqueId())) {
32 |
33 | Events.mcbPlayers.remove(player.getUniqueId());
34 | MessageManager.sendMessage(sender, "command_multichatbypass_disabled");
35 |
36 | } else {
37 |
38 | Events.mcbPlayers.add(player.getUniqueId());
39 | MessageManager.sendMessage(sender, "command_multichatbypass_enabled");
40 |
41 | }
42 |
43 | }
44 |
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/MuteCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.ProxyServer;
5 | import net.md_5.bungee.api.connection.ProxiedPlayer;
6 | import net.md_5.bungee.api.plugin.Command;
7 | import xyz.olivermartin.multichat.bungee.ChatControl;
8 | import xyz.olivermartin.multichat.bungee.ConfigManager;
9 | import xyz.olivermartin.multichat.bungee.MessageManager;
10 |
11 | public class MuteCommand extends Command {
12 |
13 | public MuteCommand() {
14 | super("multichatmute", "multichat.mute", (String[])ConfigManager.getInstance().getHandler("chatcontrol.yml").getConfig().getStringList("mutecommand").toArray(new String[0]));
15 | }
16 |
17 | @Override
18 | public void execute(CommandSender sender, String[] args) {
19 |
20 | if (!ConfigManager.getInstance().getHandler("chatcontrol.yml").getConfig().getBoolean("mute")) return;
21 |
22 | if (args.length != 1) {
23 |
24 | MessageManager.sendMessage(sender, "mute_usage");
25 |
26 | } else {
27 |
28 | String username = args[0];
29 |
30 | ProxiedPlayer target = ProxyServer.getInstance().getPlayer(username);
31 |
32 | if (target != null) {
33 |
34 | if (target.hasPermission("multichat.mute.bypass")) {
35 | MessageManager.sendMessage(sender, "mute_bypass");
36 | return;
37 | }
38 |
39 | if (!ChatControl.isMutedAnywhere(target.getUniqueId())) {
40 | ChatControl.mute(target.getUniqueId());
41 | MessageManager.sendMessage(sender, "mute_muted_staff");
42 | MessageManager.sendMessage(target, "mute_muted");
43 | } else {
44 | ChatControl.unmute(target.getUniqueId());
45 | MessageManager.sendMessage(sender, "mute_unmuted_staff");
46 | MessageManager.sendMessage(target, "mute_unmuted");
47 | }
48 |
49 | } else {
50 |
51 | MessageManager.sendMessage(sender, "mute_player_not_found");
52 |
53 | }
54 |
55 | }
56 |
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/SocialSpyCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.CommandSender;
4 | import net.md_5.bungee.api.connection.ProxiedPlayer;
5 | import net.md_5.bungee.api.plugin.Command;
6 | import xyz.olivermartin.multichat.bungee.ConfigManager;
7 | import xyz.olivermartin.multichat.bungee.MessageManager;
8 | import xyz.olivermartin.multichat.bungee.MultiChat;
9 |
10 | /**
11 | * SocialSpy Command
12 | * Allows staff members to view private messages sent by players
13 | *
14 | * @author Oliver Martin (Revilo410)
15 | *
16 | */
17 | public class SocialSpyCommand extends Command {
18 |
19 | public SocialSpyCommand() {
20 | super("socialspy", "multichat.staff.spy", (String[])ConfigManager.getInstance().getHandler("config.yml").getConfig().getStringList("socialspycommand").toArray(new String[0]));
21 | }
22 |
23 | public void execute(CommandSender sender, String[] args) {
24 |
25 | if ((sender instanceof ProxiedPlayer)) {
26 |
27 | if (args.length < 1) {
28 |
29 | if (MultiChat.socialspy.contains(((ProxiedPlayer)sender).getUniqueId())) {
30 | MultiChat.socialspy.remove(((ProxiedPlayer)sender).getUniqueId());
31 | MessageManager.sendMessage(sender, "command_socialspy_disabled");
32 | } else {
33 | MultiChat.socialspy.add(((ProxiedPlayer)sender).getUniqueId());
34 | MessageManager.sendMessage(sender, "command_socialspy_enabled");
35 | }
36 |
37 | } else {
38 | MessageManager.sendMessage(sender, "command_socialspy_usage");
39 | MessageManager.sendMessage(sender, "command_socialspy_desc");
40 | }
41 |
42 | } else {
43 | MessageManager.sendMessage(sender, "command_socialspy_only_players");
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/bungee/commands/UseCastCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.bungee.commands;
2 |
3 | import net.md_5.bungee.api.ChatColor;
4 | import net.md_5.bungee.api.CommandSender;
5 | import net.md_5.bungee.api.chat.ComponentBuilder;
6 | import net.md_5.bungee.api.plugin.Command;
7 | import xyz.olivermartin.multichat.bungee.CastControl;
8 | import xyz.olivermartin.multichat.bungee.Channel;
9 | import xyz.olivermartin.multichat.bungee.MessageManager;
10 | import xyz.olivermartin.multichat.bungee.MultiChatUtil;
11 |
12 | /**
13 | * Use Cast Command
14 | * A command designed to allow you to use a cast from the console
15 | *
16 | * @author Oliver Martin (Revilo410)
17 | *
18 | */
19 | public class UseCastCommand extends Command {
20 |
21 | private static String[] aliases = new String[] {};
22 |
23 | public UseCastCommand() {
24 | super("usecast", "multichat.cast.admin", aliases);
25 | }
26 |
27 | public void displayUsage(CommandSender sender) {
28 | MessageManager.sendMessage(sender, "command_usecast_usage");
29 | sender.sendMessage(new ComponentBuilder("/usecast ").color(ChatColor.AQUA).create());
30 | }
31 |
32 | @Override
33 | public void execute(CommandSender sender, String[] args) {
34 |
35 | if (args.length < 2) {
36 | displayUsage(sender);
37 | return;
38 | }
39 |
40 | if (CastControl.existsCast(args[0])) {
41 |
42 | String message = MultiChatUtil.getMessageFromArgs(args, 1);
43 |
44 | CastControl.sendCast(args[0], message, Channel.getGlobalChannel(), sender);
45 |
46 | } else {
47 |
48 | MessageManager.sendSpecialMessage(sender, "command_usecast_does_not_exist", args[0].toUpperCase());
49 | return;
50 |
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/common/database/DatabaseMode.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.common.database;
2 |
3 | public enum DatabaseMode {
4 |
5 | SQLite,
6 | MySQL
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/common/database/GenericPooledDatabase.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.common.database;
2 |
3 | import java.sql.SQLException;
4 |
5 | public abstract class GenericPooledDatabase {
6 |
7 | protected String url;
8 | private boolean ready;
9 |
10 | protected String username;
11 | protected String password;
12 |
13 | private int poolSize;
14 |
15 | public GenericPooledDatabase(String url, int poolSize) throws SQLException {
16 | this.url = url;
17 | this.poolSize = poolSize;
18 | ready = setupDatabase(url);
19 | }
20 |
21 | public GenericPooledDatabase(String url, String user, String pass, int poolSize) throws SQLException {
22 | this.url = url;
23 | this.poolSize = poolSize;
24 | this.username = user;
25 | this.password = pass;
26 | ready = setupDatabase(url);
27 | }
28 |
29 | public String getURL() {
30 | return this.url;
31 | }
32 |
33 | public int getPoolSize() {
34 | return this.poolSize;
35 | }
36 |
37 | public boolean isReady() {
38 | return this.ready;
39 | }
40 |
41 | public abstract SimpleConnection getConnection() throws SQLException;
42 |
43 | protected abstract boolean setupDatabase(String url) throws SQLException;
44 |
45 | protected abstract void disconnect() throws SQLException;
46 |
47 | protected abstract boolean connect() throws SQLException;
48 |
49 | public void reconnectToDatabase() throws SQLException {
50 | this.ready = connect();
51 | }
52 |
53 | public void disconnectFromDatabase() throws SQLException {
54 | disconnect();
55 | this.ready = false;
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/common/database/MySQLPooledDatabase.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.common.database;
2 |
3 | import java.sql.Connection;
4 | import java.sql.SQLException;
5 |
6 | import com.zaxxer.hikari.HikariConfig;
7 | import com.zaxxer.hikari.HikariDataSource;
8 |
9 | public class MySQLPooledDatabase extends GenericPooledDatabase {
10 |
11 | private static final String URL_PREFIX = "jdbc:mysql:";
12 |
13 | private HikariDataSource ds;
14 | private HikariConfig config;
15 |
16 | public MySQLPooledDatabase(String url, String databaseName, String username, String password, int poolSize) throws SQLException {
17 | super(URL_PREFIX + "//" + url + "/" + databaseName, username, password, poolSize);
18 | }
19 |
20 | @Override
21 | protected boolean setupDatabase(String url) throws SQLException {
22 | connect();
23 | return true;
24 | }
25 |
26 | @Override
27 | protected void disconnect() throws SQLException {
28 | if (ds != null) {
29 | ds.close();
30 | }
31 | }
32 |
33 | @Override
34 | protected boolean connect() throws SQLException {
35 |
36 | config = new HikariConfig();
37 | config.setJdbcUrl(url);
38 | config.setUsername(username);
39 | config.setPassword(password);
40 | config.setMaximumPoolSize(getPoolSize());
41 | ds = new HikariDataSource(config);
42 | Connection conn = ds.getConnection();
43 | conn.close();
44 | return true;
45 |
46 | }
47 |
48 | @Override
49 | public SimpleConnection getConnection() throws SQLException {
50 | return new SimpleConnection(ds.getConnection());
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/common/database/SQLitePooledDatabase.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.common.database;
2 |
3 | import java.io.File;
4 | import java.sql.Connection;
5 | import java.sql.SQLException;
6 |
7 | import com.zaxxer.hikari.HikariConfig;
8 | import com.zaxxer.hikari.HikariDataSource;
9 |
10 | public class SQLitePooledDatabase extends GenericPooledDatabase {
11 |
12 | private static final String URL_PREFIX = "jdbc:sqlite:";
13 |
14 | private HikariDataSource ds;
15 | private HikariConfig config;
16 |
17 | public SQLitePooledDatabase(File path, String filename, int poolSize) throws SQLException {
18 | super(URL_PREFIX + path + File.separator + filename, poolSize);
19 | }
20 |
21 | protected boolean setupDatabase(String url) throws SQLException {
22 | connect();
23 | return true;
24 | }
25 |
26 | @Override
27 | protected void disconnect() throws SQLException {
28 | if (ds != null) {
29 | ds.close();
30 | }
31 | }
32 |
33 | @Override
34 | protected boolean connect() throws SQLException {
35 |
36 | config = new HikariConfig();
37 | config.setJdbcUrl(url);
38 | config.setMaximumPoolSize(getPoolSize());
39 | ds = new HikariDataSource(config);
40 | Connection conn = ds.getConnection();
41 | conn.close();
42 | return true;
43 |
44 | }
45 |
46 | @Override
47 | public SimpleConnection getConnection() throws SQLException {
48 | return new SimpleConnection(ds.getConnection());
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/common/database/SimpleConnection.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.common.database;
2 |
3 | import java.sql.Connection;
4 | import java.sql.PreparedStatement;
5 | import java.sql.ResultSet;
6 | import java.sql.SQLException;
7 |
8 | public class SimpleConnection {
9 |
10 | public static void safelyCloseAll(SimpleConnection conn) {
11 | if (conn != null) conn.closeAll();
12 | }
13 |
14 | private Connection connection;
15 | private PreparedStatement ps;
16 | private ResultSet rs;
17 |
18 | public SimpleConnection(Connection connection) {
19 | this.connection = connection;
20 | }
21 |
22 | public void closeAll() {
23 | handleClose(connection, ps, rs);
24 | }
25 |
26 | protected void handleClose(Connection conn, PreparedStatement ps, ResultSet rs) {
27 | try {
28 | if (conn != null) conn.close();
29 | if (ps != null) ps.close();
30 | if (rs != null) rs.close();
31 | } catch (SQLException ignored) { /* EMPTY */ }
32 | }
33 |
34 | public void closeConnectionOnly() {
35 | handleClose(connection, null, null);
36 | }
37 |
38 | public void closeResultSetAndPreparedStatement() {
39 | handleClose(null, ps, rs);
40 | }
41 |
42 | public ResultSet safeQuery(String sqlTemplate, String... stringParameters) throws SQLException {
43 |
44 | closeResultSetAndPreparedStatement();
45 |
46 | ps = connection.prepareStatement(sqlTemplate);
47 |
48 | for (int i = 1; i <= stringParameters.length; i++) {
49 | ps.setString(i, stringParameters[i-1]);
50 | }
51 |
52 | rs = ps.executeQuery();
53 |
54 | return rs;
55 |
56 | }
57 |
58 | public void safeUpdate(String sqlTemplate, String... stringParameters) throws SQLException {
59 |
60 | closeResultSetAndPreparedStatement();
61 |
62 | ps = connection.prepareStatement(sqlTemplate);
63 |
64 | for (int i = 1; i <= stringParameters.length; i++) {
65 | ps.setString(i, stringParameters[i-1]);
66 | }
67 |
68 | ps.executeUpdate();
69 |
70 | }
71 |
72 | public void safeExecute(String sqlTemplate, String... stringParameters) throws SQLException {
73 |
74 | ps = connection.prepareStatement(sqlTemplate);
75 |
76 | for (int i = 1; i <= stringParameters.length; i++) {
77 | ps.setString(i, stringParameters[i-1]);
78 | }
79 |
80 | ps.execute();
81 |
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalBungeeCommunicationManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | import java.util.UUID;
4 |
5 | import xyz.olivermartin.multichat.proxy.common.MultiChatProxyPlatform;
6 |
7 | /**
8 | * Allows MultiChatLocal to communicate with a Bungeecord Proxy
9 | *
10 | * @author Oliver Martin (Revilo410)
11 | *
12 | */
13 | public abstract class LocalBungeeCommunicationManager extends LocalProxyCommunicationManager {
14 |
15 | protected final String nicknameChannel = "multichat:nick";
16 | protected final String worldChannel = "multichat:world";
17 | protected final String prefixChannel = "multichat:prefix";
18 | protected final String suffixChannel = "multichat:suffix";
19 | protected final String displayNameChannel = "multichat:dn";
20 | protected final String pxeChannel = "multichat:pxe";
21 | protected final String ppxeChannel = "multichat:ppxe";
22 | protected final String chatChannel = "multichat:chat";
23 |
24 | protected LocalBungeeCommunicationManager(MultiChatLocalPlatform localPlatform) {
25 | super(localPlatform, MultiChatProxyPlatform.BUNGEE);
26 | }
27 |
28 | protected abstract boolean sendUUIDAndString(String channel, UUID uuid, String value);
29 |
30 | protected abstract boolean sendUUIDAndStringAndString(String channel, UUID uuid, String value1, String value2);
31 |
32 | protected abstract boolean sendStringAndString(String channel, String string1, String string2);
33 |
34 | protected abstract boolean sendString(String channel, String string);
35 |
36 | @Override
37 | protected void sendNicknameUpdate(UUID uuid, String nickname) {
38 | sendUUIDAndString(nicknameChannel, uuid, nickname);
39 | }
40 |
41 | @Override
42 | public void sendWorldUpdate(UUID uuid, String world) {
43 | sendUUIDAndString(worldChannel, uuid, world);
44 | }
45 |
46 | @Override
47 | protected void sendPrefixUpdate(UUID uuid, String prefix) {
48 | sendUUIDAndString(prefixChannel, uuid, prefix);
49 | }
50 |
51 | @Override
52 | protected void sendSuffixUpdate(UUID uuid, String suffix) {
53 | sendUUIDAndString(suffixChannel, uuid, suffix);
54 | }
55 |
56 | @Override
57 | protected void sendDisplayNameUpdate(UUID uuid, String displayName) {
58 | sendUUIDAndString(displayNameChannel, uuid, displayName);
59 | }
60 |
61 | @Override
62 | public void sendProxyExecuteMessage(String command) {
63 | sendString(pxeChannel, command);
64 | }
65 |
66 | @Override
67 | public void sendProxyExecutePlayerMessage(String command, String player) {
68 | sendStringAndString(ppxeChannel, command, player);
69 | }
70 |
71 | @Override
72 | public void sendChatMessage(UUID uuid, String message, String format) {
73 | sendUUIDAndStringAndString(chatChannel, uuid, message, format);
74 | }
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalConsoleLogger.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | public abstract class LocalConsoleLogger {
4 |
5 | private MultiChatLocalPlatform platform;
6 |
7 | protected String prefix;
8 | protected String debugPrefix;
9 |
10 | private boolean debug;
11 |
12 | protected LocalConsoleLogger(MultiChatLocalPlatform platform) {
13 | this.platform = platform;
14 | debug = false;
15 | prefix = "&8[&2M&aC&3L&8]&7 ";
16 | debugPrefix = "&8[&2M&aC&3L&8][&4DEBUG&8]&7 ";
17 | }
18 |
19 | public void setPrefix(String prefix) {
20 | this.prefix = prefix;
21 | }
22 |
23 | public String getPrefix() {
24 | return this.prefix;
25 | }
26 |
27 | public void setDebug(boolean debug) {
28 | this.debug = debug;
29 | }
30 |
31 | public boolean toggleDebug() {
32 | this.debug = !this.debug;
33 | return this.debug;
34 | }
35 |
36 | public MultiChatLocalPlatform getPlatform() {
37 | return this.platform;
38 | }
39 |
40 | protected abstract void displayMessageUsingLogger(String message);
41 |
42 | protected abstract void sendColouredMessageToConsoleSender(String message);
43 |
44 | public void log(String message) {
45 | sendColouredMessageToConsoleSender(prefix + message);
46 | }
47 |
48 | public void debug(String message) {
49 | if (debug) sendColouredMessageToConsoleSender(debugPrefix + message);
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalMetaManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | import java.util.UUID;
4 |
5 | public abstract class LocalMetaManager {
6 |
7 | public LocalMetaManager() { /* EMPTY */ }
8 |
9 | public String getNick(UUID uuid) {
10 | return MultiChatLocal.getInstance().getNameManager().getCurrentName(uuid);
11 | }
12 |
13 | /**
14 | * Get the prefix of an online player
15 | * @param uuid
16 | * @return The prefix if they are online, or blank if they are not
17 | */
18 | public abstract String getPrefix(UUID uuid);
19 |
20 | /**
21 | * Get the suffix of an online player
22 | * @param uuid
23 | * @return The suffix if they are online, or blank if they are not
24 | */
25 | public abstract String getSuffix(UUID uuid);
26 |
27 | /**
28 | * Get the world of an online player
29 | * @param uuid
30 | * @return The world if they are online, or blank if they are not
31 | */
32 | public abstract String getWorld(UUID uuid);
33 |
34 | /**
35 | * Get the display name of an online player
36 | * @param uuid
37 | * @return The display name if they are online, or blank if they are not
38 | */
39 | public abstract String getDisplayName(UUID uuid);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalPlaceholderManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalPlaceholderManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalProxyCommunicationManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | import java.util.UUID;
4 |
5 | import xyz.olivermartin.multichat.proxy.common.MultiChatProxyPlatform;
6 |
7 | /**
8 | * Allows MultiChatLocal to communicate with the Proxy
9 | *
10 | * @author Oliver Martin (Revilo410)
11 | *
12 | */
13 | public abstract class LocalProxyCommunicationManager {
14 |
15 | private MultiChatProxyPlatform proxyPlatform;
16 | private MultiChatLocalPlatform localPlatform;
17 |
18 | protected LocalProxyCommunicationManager(MultiChatLocalPlatform localPlatform, MultiChatProxyPlatform proxyPlatform) {
19 | this.proxyPlatform = proxyPlatform;
20 | this.localPlatform = localPlatform;
21 | }
22 |
23 | public MultiChatLocalPlatform getLocalPlatform() {
24 | return this.localPlatform;
25 | }
26 |
27 | public MultiChatProxyPlatform getProxyPlatform() {
28 | return this.proxyPlatform;
29 | }
30 |
31 | public void updatePlayerMeta(UUID uuid) {
32 |
33 | sendNicknameUpdate(uuid, MultiChatLocal.getInstance().getMetaManager().getNick(uuid));
34 | sendWorldUpdate(uuid, MultiChatLocal.getInstance().getMetaManager().getWorld(uuid));
35 | sendPrefixUpdate(uuid, MultiChatLocal.getInstance().getMetaManager().getPrefix(uuid));
36 | sendSuffixUpdate(uuid, MultiChatLocal.getInstance().getMetaManager().getSuffix(uuid));
37 | sendDisplayNameUpdate(uuid, MultiChatLocal.getInstance().getMetaManager().getDisplayName(uuid));
38 |
39 | }
40 |
41 | protected abstract void sendNicknameUpdate(UUID uuid, String nickname);
42 |
43 | public abstract void sendWorldUpdate(UUID uuid, String world);
44 |
45 | protected abstract void sendPrefixUpdate(UUID uuid, String prefix);
46 |
47 | protected abstract void sendSuffixUpdate(UUID uuid, String suffix);
48 |
49 | protected abstract void sendDisplayNameUpdate(UUID uuid, String displayName);
50 |
51 | public abstract void sendProxyExecuteMessage(String command);
52 |
53 | public abstract void sendProxyExecutePlayerMessage(String command, String player);
54 |
55 | public abstract void sendChatMessage(UUID uuid, String message, String format);
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/LocalPseudoChannel.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | import java.util.List;
4 | import java.util.UUID;
5 |
6 | public class LocalPseudoChannel {
7 |
8 | public LocalPseudoChannel(String name, List members, boolean whitelist) {
9 |
10 | this.name = name;
11 | this.whitelistMembers = whitelist;
12 | this.members = members;
13 |
14 | }
15 |
16 | public String name;
17 | public boolean whitelistMembers;
18 | public List members;
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/MultiChatLocalPlatform.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | public enum MultiChatLocalPlatform {
4 |
5 | SPIGOT,
6 | SPONGE
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/MultiChatLocalPlayer.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common;
2 |
3 | import java.util.UUID;
4 |
5 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
6 |
7 | public interface MultiChatLocalPlayer extends MultiChatLocalCommandSender {
8 |
9 | public UUID getUniqueId();
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/commands/MultiChatLocalCommandSender.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.commands;
2 |
3 | public interface MultiChatLocalCommandSender {
4 |
5 | public void sendGoodMessage(String message);
6 |
7 | public void sendBadMessage(String message);
8 |
9 | public void sendInfoMessageA(String message);
10 |
11 | public void sendInfoMessageB(String message);
12 |
13 | public boolean hasPermission(String permission);
14 |
15 | public boolean isPlayer();
16 |
17 | public String getName();
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/commands/ProxyExecuteCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.commands;
2 |
3 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
4 |
5 | public abstract class ProxyExecuteCommand {
6 |
7 | protected boolean executeProxyExecuteCommand(MultiChatLocalCommandSender sender, String[] args) {
8 |
9 | if (args.length < 1) {
10 | return false;
11 | }
12 |
13 | boolean playerFlag = false;
14 | String player = ".*";
15 |
16 | // Handle flags
17 | int index = 0;
18 |
19 | while (index < args.length) {
20 |
21 | if (args[index].equalsIgnoreCase("-p")) {
22 | if (index+1 < args.length) {
23 | playerFlag = true;
24 | player = args[index+1];
25 | }
26 | } else {
27 | break;
28 | }
29 |
30 | index = index+2;
31 |
32 | }
33 |
34 | if (index >= args.length) {
35 | return false; // Show usage
36 | }
37 |
38 | String message = "";
39 | for (String arg : args) {
40 | if (index > 0) {
41 | index--;
42 | } else {
43 | message = message + arg + " ";
44 | }
45 | }
46 |
47 | if (playerFlag) {
48 |
49 | MultiChatLocal.getInstance().getProxyCommunicationManager().sendProxyExecutePlayerMessage(message, player);
50 |
51 | } else {
52 |
53 | MultiChatLocal.getInstance().getProxyCommunicationManager().sendProxyExecuteMessage(message);
54 |
55 | }
56 |
57 | sender.sendGoodMessage("SENT COMMAND TO PROXY SERVER");
58 |
59 | return true;
60 |
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/commands/RealnameCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.commands;
2 |
3 | import java.util.Optional;
4 | import java.util.Set;
5 | import java.util.UUID;
6 |
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
8 | import xyz.olivermartin.multichat.local.common.storage.LocalNameManager;
9 |
10 | public abstract class RealnameCommand {
11 |
12 | public boolean executeRealnameCommand(MultiChatLocalCommandSender sender, String[] args) {
13 |
14 | if (!sender.isPlayer()) {
15 | sender.sendBadMessage("Only players can use this command!");
16 | return true;
17 | }
18 |
19 | if (args.length != 1) {
20 | return false;
21 | }
22 |
23 | LocalNameManager lnm = MultiChatLocal.getInstance().getNameManager();
24 |
25 | if (lnm.existsNickname(args[0])) {
26 |
27 | Optional player;
28 | player = lnm.getNameFromNickname(args[0]);
29 |
30 | if (player.isPresent()) {
31 | sender.sendGoodMessage("Nickname: '" + args[0] + "' Belongs to player: '" + player.get() + "'");
32 | } else {
33 | sender.sendBadMessage("No one could be found with nickname: " + args[0]);
34 | }
35 |
36 | return true;
37 |
38 | } else if (sender.hasPermission("multichatlocal.realname.partial")) {
39 |
40 | Optional> matches = lnm.getPartialNicknameMatches(args[0]);
41 |
42 | if (matches.isPresent()) {
43 |
44 | int limit = 10;
45 |
46 | sender.sendInfoMessageA("No one could be found with the exact nickname: " + args[0]);
47 | sender.sendInfoMessageB("The following were found as partial matches:");
48 |
49 | for (UUID uuid : matches.get()) {
50 |
51 | if (limit > 0 || sender.hasPermission("multichatlocal.realname.nolimit")) {
52 | sender.sendGoodMessage("Nickname: '" + lnm.getCurrentName(uuid, false) + "' Belongs to player: '" + lnm.getName(uuid) + "'");
53 | limit--;
54 | } else {
55 | sender.sendInfoMessageA("Only the first 10 results have been shown, please try a more specific query!");
56 | break;
57 | }
58 |
59 | }
60 |
61 | } else {
62 |
63 | sender.sendBadMessage("No one could be found with nickname: " + args[0]);
64 |
65 | }
66 |
67 | return true;
68 |
69 | } else {
70 |
71 | sender.sendBadMessage("No one could be found with nickname: " + args[0]);
72 | return true;
73 |
74 | }
75 |
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/commands/UsernameCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.commands;
2 |
3 | import java.util.Optional;
4 | import java.util.Set;
5 | import java.util.UUID;
6 |
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
8 | import xyz.olivermartin.multichat.local.common.storage.LocalNameManager;
9 |
10 | public abstract class UsernameCommand {
11 |
12 | public boolean executeUsernameCommand(MultiChatLocalCommandSender sender, String[] args) {
13 |
14 | if (!sender.isPlayer()) {
15 | sender.sendBadMessage("Only players can use this command!");
16 | return true;
17 | }
18 |
19 | if (args.length != 1) {
20 | return false;
21 | }
22 |
23 | LocalNameManager lnm = MultiChatLocal.getInstance().getNameManager();
24 |
25 | if (lnm.existsPlayer(args[0])) {
26 |
27 | Optional player;
28 | player = lnm.getFormattedNameFromName(args[0]);
29 |
30 | if (player.isPresent()) {
31 | sender.sendGoodMessage("User exists with name: '" + player.get() + "'");
32 | } else {
33 | sender.sendBadMessage("No one could be found with username: " + args[0]);
34 | }
35 |
36 | return true;
37 |
38 | } else if (sender.hasPermission("multichatlocal.username.partial")) {
39 |
40 | Optional> matches = lnm.getPartialNameMatches(args[0]);
41 |
42 | if (matches.isPresent()) {
43 |
44 | int limit = 10;
45 |
46 | sender.sendInfoMessageA("No one could be found with the exact username: " + args[0]);
47 | sender.sendInfoMessageB("The following were found as partial matches:");
48 |
49 | for (UUID uuid : matches.get()) {
50 |
51 | if (limit > 0 || sender.hasPermission("multichatlocal.username.nolimit")) {
52 | sender.sendGoodMessage("- '" + lnm.getName(uuid) + "'");
53 | limit--;
54 | } else {
55 | sender.sendInfoMessageA("Only the first 10 results have been shown, please try a more specific query!");
56 | break;
57 | }
58 |
59 | }
60 |
61 | } else {
62 |
63 | sender.sendBadMessage("No one could be found with username: " + args[0]);
64 |
65 | }
66 |
67 | return true;
68 |
69 | } else {
70 |
71 | sender.sendBadMessage("No one could be found with username: " + args[0]);
72 | return true;
73 |
74 | }
75 |
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/config/LocalConfigManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.config;
2 |
3 | import java.io.File;
4 |
5 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
6 | import xyz.olivermartin.multichat.local.spigot.LocalSpigotConfig;
7 | import xyz.olivermartin.multichat.local.sponge.LocalSpongeConfig;
8 |
9 | /**
10 | * MultiChatLocal's Config Manager
11 | *
12 | * Manages all access to configuration files etc.
13 | *
14 | * @author Oliver Martin (Revilo410)
15 | *
16 | */
17 | public class LocalConfigManager {
18 |
19 | private LocalConfig localConfig;
20 | // Room to example by having: LocalJoinMessagesConfigHandler localJoinMessagesConfig;
21 | // etc.
22 |
23 | public LocalConfigManager() { /* EMPTY */ }
24 |
25 | /**
26 | * Register the local config file with the Local Config Manager
27 | *
28 | * Should be registered in onEnable()
29 | *
30 | * @param platform The platform MultiChatLocal is using (Spigot, Sponge etc.)
31 | * @param fileName filename i.e. config.yml
32 | * @param configPath THE PATH WITHOUT THE FILE NAME
33 | */
34 | public void registerLocalConfig(MultiChatLocalPlatform platform, String fileName, File configPath) {
35 |
36 | switch (platform) {
37 | case SPIGOT:
38 | localConfig = new LocalSpigotConfig(configPath, fileName);
39 | break;
40 | case SPONGE:
41 | localConfig = new LocalSpongeConfig(configPath, fileName);
42 | break;
43 | default:
44 | throw new IllegalArgumentException("Could not register config because this type of platform is not allowed.");
45 |
46 | }
47 |
48 | }
49 |
50 | public LocalConfig getLocalConfig() {
51 |
52 | if (localConfig == null) throw new IllegalStateException("No local config has been registered");
53 | return localConfig;
54 |
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/config/LocalConfigStatus.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.config;
2 |
3 | public enum LocalConfigStatus {
4 |
5 | CREATED,
6 | LOADED,
7 | FAILED,
8 | SAVED,
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/config/RegexChannelForcer.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/common/config/RegexChannelForcer.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/LocalBungeeMessage.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners;
2 |
3 | import java.io.IOException;
4 |
5 | public interface LocalBungeeMessage {
6 |
7 | public String readUTF() throws IOException;
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/LocalBungeeObjectMessage.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners;
2 |
3 | import java.io.IOException;
4 |
5 | public interface LocalBungeeObjectMessage extends LocalBungeeMessage {
6 |
7 | public Object readObject() throws ClassNotFoundException, IOException;
8 |
9 | public boolean readBoolean() throws IOException;
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/LocalLoginLogoutListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners;
2 |
3 | import java.util.Map;
4 | import java.util.UUID;
5 |
6 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
8 |
9 | public abstract class LocalLoginLogoutListener {
10 |
11 | protected abstract boolean isPlayerStillOnline(MultiChatLocalPlayer player);
12 |
13 | protected void handleLoginEvent(MultiChatLocalPlayer player) {
14 |
15 | MultiChatLocal.getInstance().getNameManager().registerPlayer(player.getUniqueId(), player.getName());
16 |
17 | Map playerChannels = MultiChatLocal.getInstance().getDataStore().getPlayerChannels();
18 | synchronized (playerChannels) {
19 | if (!playerChannels.containsKey(player.getUniqueId())) {
20 | playerChannels.put(player.getUniqueId(), "global");
21 | }
22 | }
23 |
24 | Map simpleColourMap = MultiChatLocal.getInstance().getDataStore().getSimpleColourMap();
25 | synchronized (simpleColourMap) {
26 | if (!simpleColourMap.containsKey(player.getUniqueId())) {
27 | simpleColourMap.put(player.getUniqueId(), false);
28 | }
29 | }
30 |
31 | Map rgbColourMap = MultiChatLocal.getInstance().getDataStore().getRGBColourMap();
32 | synchronized (rgbColourMap) {
33 | if (!rgbColourMap.containsKey(player.getUniqueId())) {
34 | rgbColourMap.put(player.getUniqueId(), false);
35 | }
36 | }
37 |
38 | MultiChatLocal.getInstance().getProxyCommunicationManager().updatePlayerMeta(player.getUniqueId());
39 |
40 | }
41 |
42 | protected void handleLogoutEvent(MultiChatLocalPlayer player) {
43 |
44 | MultiChatLocal.getInstance().getNameManager().unregisterPlayer(player.getUniqueId());
45 |
46 | Map playerChannels = MultiChatLocal.getInstance().getDataStore().getPlayerChannels();
47 | synchronized (playerChannels) {
48 | playerChannels.remove(player.getUniqueId());
49 | }
50 |
51 | Map simpleColourMap = MultiChatLocal.getInstance().getDataStore().getSimpleColourMap();
52 | synchronized (simpleColourMap) {
53 | simpleColourMap.remove(player.getUniqueId());
54 | }
55 |
56 | Map rgbColourMap = MultiChatLocal.getInstance().getDataStore().getRGBColourMap();
57 | synchronized (rgbColourMap) {
58 | rgbColourMap.remove(player.getUniqueId());
59 | }
60 |
61 |
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/LocalWorldChangeListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners;
2 |
3 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
4 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
5 |
6 | public abstract class LocalWorldChangeListener {
7 |
8 | protected void updatePlayerWorld(MultiChatLocalPlayer player, String world) {
9 | MultiChatLocal.getInstance().getProxyCommunicationManager().sendWorldUpdate(player.getUniqueId(), world);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/chat/MultiChatLocalPlayerChatEvent.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners.chat;
2 |
3 | import xyz.olivermartin.multichat.local.common.LocalPseudoChannel;
4 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
5 |
6 | public interface MultiChatLocalPlayerChatEvent {
7 |
8 | public MultiChatLocalPlayer getPlayer();
9 |
10 | public String getMessage();
11 |
12 | public String getFormat();
13 |
14 | public void setMessage(String message);
15 |
16 | public void setFormat(String format);
17 |
18 | public boolean isCancelled();
19 |
20 | public void setCancelled(boolean cancelled);
21 |
22 | public void removeIgnoredPlayersAndNonChannelMembersFromRecipients(LocalPseudoChannel channel);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/communication/LocalActionListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners.communication;
2 |
3 | import java.io.IOException;
4 |
5 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
6 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
7 |
8 | public abstract class LocalActionListener {
9 |
10 | protected abstract void executeCommandAsConsole(String command);
11 |
12 | protected boolean handleMessage(LocalBungeeMessage message) {
13 |
14 | try {
15 |
16 | String command = message.readUTF();
17 |
18 | // HANDLE LEGACY SERVER HACK
19 | if (isHackedMessage(command)) {
20 | handleHackedMessage(command);
21 | return true;
22 | }
23 |
24 | executeCommandAsConsole(command);
25 | return true;
26 |
27 | } catch (IOException e) {
28 |
29 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred trying to read local action message from Bungeecord, is the server lagging?");
30 | return false;
31 |
32 | }
33 |
34 | }
35 |
36 | private boolean isHackedMessage(String command) {
37 | return (command.equals("!!!LEGACYSERVER!!!") || command.equals("!!!NOTLEGACYSERVER!!!"));
38 | }
39 |
40 | private void handleHackedMessage(String command) {
41 |
42 | if (command.equals("!!!LEGACYSERVER!!!")) {
43 | MultiChatLocal.getInstance().getDataStore().setLegacy(true);
44 | } else {
45 | MultiChatLocal.getInstance().getDataStore().setLegacy(false);
46 | }
47 |
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/communication/LocalCastListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners.communication;
2 |
3 | import java.io.IOException;
4 |
5 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
6 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
7 |
8 | public abstract class LocalCastListener {
9 |
10 | protected boolean handleMessage(LocalBungeeMessage message) {
11 |
12 | try {
13 |
14 | String castMessage = message.readUTF();
15 | broadcastRawMessageToChat(castMessage);
16 | return true;
17 |
18 | } catch (IOException e) {
19 |
20 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred trying to read local cast message from Bungeecord, is the server lagging?");
21 | return false;
22 |
23 | }
24 |
25 | }
26 |
27 | protected abstract void broadcastRawMessageToChat(String message);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/communication/LocalIgnoreListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners.communication;
2 |
3 | import java.io.IOException;
4 | import java.util.Map;
5 | import java.util.Set;
6 | import java.util.UUID;
7 |
8 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
9 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
10 |
11 | public abstract class LocalIgnoreListener {
12 |
13 | @SuppressWarnings("unchecked")
14 | protected boolean handleMessage(LocalBungeeObjectMessage message) {
15 |
16 | try {
17 |
18 | MultiChatLocal.getInstance().getConsoleLogger().debug("{multichat:ignore} Reading ignore map...");
19 | MultiChatLocal.getInstance().getDataStore().setIgnoreMap((Map>) message.readObject());
20 | MultiChatLocal.getInstance().getConsoleLogger().debug("{multichat:ignore} Successfully read ignore map!");
21 | return true;
22 |
23 | } catch (IOException e) {
24 |
25 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred trying to read local ignore message from Bungeecord, is the server lagging?");
26 | return false;
27 |
28 | } catch (ClassNotFoundException e) {
29 |
30 | MultiChatLocal.getInstance().getConsoleLogger().log("Could not read the ignore Map from local ignore message...");
31 | return false;
32 | }
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/communication/LocalPlayerActionListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners.communication;
2 |
3 | import java.io.IOException;
4 |
5 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
6 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
7 |
8 | public abstract class LocalPlayerActionListener {
9 |
10 | protected abstract void executeCommandForPlayersMatchingRegex(String playerRegex, String command);
11 |
12 | protected abstract void sendChatAsPlayer(String playerName, String rawMessage);
13 |
14 | protected boolean handleMessage(LocalBungeeMessage message) {
15 |
16 | try {
17 |
18 | String playerRegex = message.readUTF();
19 | String command = message.readUTF();
20 |
21 | // Handle the local global direct message hack
22 | if (isHackedMessage(command)) {
23 | handleHackedMessage(command, playerRegex);
24 | return true;
25 | }
26 |
27 | executeCommandForPlayersMatchingRegex(playerRegex, command);
28 |
29 | return true;
30 |
31 | } catch (IOException e) {
32 |
33 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred trying to read local player action message from Bungeecord, is the server lagging?");
34 | return false;
35 |
36 | }
37 |
38 | }
39 |
40 | private boolean isHackedMessage(String command) {
41 | return (command.startsWith("!SINGLE L MESSAGE!") || command.startsWith("!SINGLE G MESSAGE!"));
42 | }
43 |
44 | private void handleHackedMessage(String command, String player) {
45 |
46 | String message = command.substring("!SINGLE X MESSAGE!".length(), command.length());
47 |
48 | if (command.startsWith("!SINGLE L MESSAGE!")) {
49 | MultiChatLocal.getInstance().getChatManager().queueChatChannel(player, "local");
50 | } else {
51 | MultiChatLocal.getInstance().getChatManager().queueChatChannel(player, "global");
52 | }
53 |
54 | sendChatAsPlayer(player, message);
55 |
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/listeners/communication/LocalPlayerMetaListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.listeners.communication;
2 |
3 | import java.io.IOException;
4 | import java.util.Optional;
5 |
6 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
8 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
9 |
10 | public abstract class LocalPlayerMetaListener {
11 |
12 | protected abstract Optional getPlayerFromName(String playername);
13 |
14 | protected boolean handleMessage(LocalBungeeMessage message) {
15 |
16 | try {
17 |
18 | boolean setDisplayName = false;
19 | boolean globalChat = false;
20 | String displayNameFormat = "";
21 |
22 | Optional opPlayer = getPlayerFromName(message.readUTF());
23 |
24 | if (!opPlayer.isPresent()) return true;
25 |
26 | MultiChatLocalPlayer player = opPlayer.get();
27 |
28 | if (message.readUTF().equals("T")) {
29 | setDisplayName = true;
30 | }
31 |
32 | displayNameFormat = message.readUTF();
33 |
34 | MultiChatLocal.getInstance().getDataStore().setSetDisplayName(setDisplayName);
35 | MultiChatLocal.getInstance().getDataStore().setDisplayNameFormatLastVal(displayNameFormat);
36 |
37 | MultiChatLocal.getInstance().getProxyCommunicationManager().updatePlayerMeta(player.getUniqueId());
38 |
39 | if (message.readUTF().equals("T")) {
40 | globalChat = true;
41 | }
42 |
43 | MultiChatLocal.getInstance().getDataStore().setGlobalChatServer(globalChat);
44 |
45 | MultiChatLocal.getInstance().getDataStore().setGlobalChatFormat(message.readUTF());
46 |
47 | return true;
48 |
49 | } catch (IOException e) {
50 |
51 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred trying to read local player meta message from Bungeecord, is the server lagging?");
52 | return false;
53 |
54 | }
55 |
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalDatabaseCredentials.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.storage;
2 |
3 | import java.util.List;
4 |
5 | public class LocalDatabaseCredentials {
6 |
7 | private static LocalDatabaseCredentials instance;
8 |
9 | static {
10 | instance = new LocalDatabaseCredentials();
11 | }
12 |
13 | public static LocalDatabaseCredentials getInstance() {
14 | return instance;
15 | }
16 |
17 | // END STATIC
18 |
19 | private LocalDatabaseCredentials() {
20 | /* EMPTY */
21 | }
22 |
23 | private String url;
24 | private String database;
25 | private String user;
26 | private String password;
27 | private List flags;
28 |
29 | public void updateValues(String url, String database, String user, String password, List flags) {
30 | this.url = url;
31 | this.database = database;
32 | this.user = user;
33 | this.password = password;
34 | this.flags = flags;
35 | }
36 |
37 | public String getURL() {
38 | return this.url;
39 | }
40 |
41 | public String getDatabase() {
42 | return this.database;
43 | }
44 |
45 | public String getUser() {
46 | return this.user;
47 | }
48 |
49 | public String getPassword() {
50 | return this.password;
51 | }
52 |
53 | public List getFlags() {
54 | return this.flags;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalDatabaseSetupManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.storage;
2 |
3 | import java.sql.SQLException;
4 |
5 | import xyz.olivermartin.multichat.common.database.DatabaseManager;
6 | import xyz.olivermartin.multichat.common.database.DatabaseMode;
7 | import xyz.olivermartin.multichat.common.database.SimpleConnection;
8 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
9 |
10 | public class LocalDatabaseSetupManager {
11 |
12 | private String databaseName;
13 | private boolean useMySQL;
14 | private boolean connected;
15 |
16 | public LocalDatabaseSetupManager(String databaseName, boolean useMySQL) {
17 |
18 | this.useMySQL = useMySQL;
19 | this.databaseName = databaseName;
20 | connected = setupDatabase();
21 |
22 | }
23 |
24 | public boolean isConnected() {
25 | return connected;
26 | }
27 |
28 | private boolean setupDatabase() {
29 |
30 | try {
31 |
32 | if (useMySQL) {
33 |
34 | // MYSQL SETTINGS
35 |
36 | DatabaseManager.getInstance().setMode(DatabaseMode.MySQL);
37 |
38 | DatabaseManager.getInstance().setURLMySQL(LocalDatabaseCredentials.getInstance().getURL());
39 | DatabaseManager.getInstance().setUsernameMySQL(LocalDatabaseCredentials.getInstance().getUser());
40 | DatabaseManager.getInstance().setPasswordMySQL(LocalDatabaseCredentials.getInstance().getPassword());
41 | DatabaseManager.getInstance().setFlagsMySQL(LocalDatabaseCredentials.getInstance().getFlags());
42 | DatabaseManager.getInstance().createDatabase(databaseName, LocalDatabaseCredentials.getInstance().getDatabase());
43 |
44 | } else {
45 |
46 | // SQLITE SETTINGS
47 |
48 | DatabaseManager.getInstance().setMode(DatabaseMode.SQLite);
49 | DatabaseManager.getInstance().setPathSQLite(MultiChatLocal.getInstance().getConfigDirectory());
50 |
51 | DatabaseManager.getInstance().createDatabase(databaseName);
52 |
53 | }
54 |
55 | SimpleConnection conn = DatabaseManager.getInstance().getDatabase(databaseName).get().getConnection();
56 | conn.safeUpdate("CREATE TABLE IF NOT EXISTS name_data(id VARCHAR(128), f_name VARCHAR(255), u_name VARCHAR(255), PRIMARY KEY (id));");
57 | conn.safeUpdate("CREATE TABLE IF NOT EXISTS nick_data(id VARCHAR(128), u_nick VARCHAR(255), f_nick VARCHAR(255), PRIMARY KEY (id));");
58 | conn.closeAll();
59 |
60 | return true;
61 |
62 | } catch (SQLException e) {
63 |
64 | return false;
65 |
66 | }
67 |
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalFileSystemManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.storage;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.io.InputStream;
6 | import java.nio.file.CopyOption;
7 | import java.nio.file.Files;
8 |
9 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
10 | import xyz.olivermartin.multichat.local.spigot.LocalSpigotNicknameFile;
11 | import xyz.olivermartin.multichat.local.sponge.LocalSpongeNicknameFile;
12 |
13 | public class LocalFileSystemManager {
14 |
15 | private LocalNicknameFile nicknameFile;
16 |
17 | public LocalFileSystemManager() {
18 | /* EMPTY */
19 | }
20 |
21 | /**
22 | * Register the local nicknames data file with the Local File System Manager
23 | *
24 | * Should be registered in onEnable()
25 | *
26 | * @param platform The platform MultiChatLocal is using (Spigot, Sponge etc.)
27 | * @param fileName filename i.e. namedata.dat
28 | * @param configPath THE PATH WITHOUT THE FILE NAME
29 | */
30 | public void registerNicknameFile(MultiChatLocalPlatform platform, String fileName, File configPath, LocalFileNameManager lfnm) {
31 |
32 | switch (platform) {
33 | case SPIGOT:
34 | nicknameFile = new LocalSpigotNicknameFile(configPath, fileName, lfnm);
35 | break;
36 | case SPONGE:
37 | nicknameFile = new LocalSpongeNicknameFile(configPath, fileName, lfnm);
38 | break;
39 | default:
40 | throw new IllegalArgumentException("Could not register file because this type of platform is not allowed.");
41 |
42 | }
43 |
44 | }
45 |
46 | public LocalNicknameFile getNicknameFile() {
47 |
48 | if (nicknameFile == null) throw new IllegalStateException("No local nickname file has been registered");
49 | return nicknameFile;
50 |
51 | }
52 |
53 | public boolean createResource(String fileName, File destination) {
54 |
55 | // Load default file into input stream
56 | InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName);
57 |
58 | // Copy to desired location
59 | try {
60 | Files.copy(inputStream, new File(destination, fileName).toPath(), new CopyOption[0]);
61 | return true;
62 | } catch (IOException e) {
63 | return false;
64 | }
65 |
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalNameManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalNameManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalNameManagerMode.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.storage;
2 |
3 | public enum LocalNameManagerMode {
4 |
5 | SQL,
6 | FILE
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/common/storage/LocalNicknameFile.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.common.storage;
2 |
3 | import java.io.File;
4 |
5 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
6 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
7 |
8 | public abstract class LocalNicknameFile {
9 |
10 | // FILE SETTINGS
11 | private File configPath;
12 | private String fileName;
13 | protected boolean ready;
14 | private MultiChatLocalPlatform platform;
15 | protected LocalFileNameManager lfnm;
16 |
17 | public LocalNicknameFile(File configPath, String fileName, LocalFileNameManager lfnm, MultiChatLocalPlatform platform) {
18 | this.configPath = configPath;
19 | this.fileName = fileName;
20 | this.platform = platform;
21 | this.lfnm = lfnm;
22 | ready = startupFile();
23 | }
24 |
25 | public MultiChatLocalPlatform getPlatform() {
26 | return this.platform;
27 | }
28 |
29 | protected File getFile() {
30 | return new File(configPath, fileName);
31 | }
32 |
33 | /**
34 | * Save the nickname data to file
35 | * @return
36 | */
37 | public boolean save() {
38 | File file = new File(configPath, fileName);
39 | return saveFile(file);
40 | }
41 |
42 | /**
43 | * Load the nickname data from the file into the system (overwrites anything currently loaded)
44 | * @return
45 | */
46 | public boolean reload() {
47 | return startupFile();
48 | }
49 |
50 | protected boolean startupFile() {
51 |
52 | MultiChatLocal.getInstance().getConsoleLogger().debug("[LocalNicknameFile] Starting up file...");
53 |
54 | File file = new File(configPath, fileName);
55 |
56 | boolean status;
57 |
58 | if (!file.exists()) {
59 | MultiChatLocal.getInstance().getConsoleLogger().debug("[LocalNicknameFile] File does not already exist...");
60 | status = saveFile(file);
61 | }
62 |
63 | status = loadFile(file);
64 |
65 | MultiChatLocal.getInstance().getConsoleLogger().debug("[LocalNicknameFile] FINAL STATUS = " + status);
66 |
67 | return status;
68 |
69 | }
70 |
71 | /**
72 | * Load the file contents into the name manager
73 | * @param file
74 | * @return
75 | */
76 | protected abstract boolean loadFile(File file);
77 |
78 | /**
79 | * Save the file contents from the name manager
80 | * @param file
81 | * @return
82 | */
83 | protected abstract boolean saveFile(File file);
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotChatManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotChatManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotConsoleLogger.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot;
2 |
3 | import java.util.logging.Logger;
4 |
5 | import org.bukkit.Bukkit;
6 | import org.bukkit.ChatColor;
7 |
8 | import xyz.olivermartin.multichat.local.common.LocalConsoleLogger;
9 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
10 |
11 | public class LocalSpigotConsoleLogger extends LocalConsoleLogger {
12 |
13 | private Logger logger;
14 |
15 | protected LocalSpigotConsoleLogger(Logger logger) {
16 | super(MultiChatLocalPlatform.SPIGOT);
17 | }
18 |
19 | @Override
20 | protected void displayMessageUsingLogger(String message) {
21 | logger.info(message);
22 | }
23 |
24 | @Override
25 | protected void sendColouredMessageToConsoleSender(String message) {
26 | Bukkit.getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', message));
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotFileNameManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot;
2 |
3 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
4 | import xyz.olivermartin.multichat.local.common.storage.LocalFileNameManager;
5 |
6 | public class LocalSpigotFileNameManager extends LocalFileNameManager {
7 |
8 | public LocalSpigotFileNameManager() {
9 | super(MultiChatLocalPlatform.SPIGOT);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotMetaManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotMetaManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/LocalSpigotPlaceholderManager.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot;
2 |
3 | import java.util.UUID;
4 |
5 | import xyz.olivermartin.multichat.bungee.MultiChatUtil;
6 | import xyz.olivermartin.multichat.local.common.LocalPlaceholderManager;
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
8 |
9 | public class LocalSpigotPlaceholderManager extends LocalPlaceholderManager {
10 |
11 | public LocalSpigotPlaceholderManager() {
12 | super(MultiChatLocalPlatform.SPIGOT);
13 | }
14 |
15 | @Override
16 | public String buildChatFormat(UUID uuid, String format) {
17 |
18 | // Reformat any hex codes in the format
19 | format = MultiChatUtil.reformatRGB(format);
20 |
21 | // RESPECT OTHER PLUGIN'S DISPLAY NAMES FIRST! (Allows for factions etc.)
22 | format = format.replace("%DISPLAYNAME%", "%1$s");
23 |
24 | // PROCESS REST ACCORDING TO MULTICHAT'S PLACEHOLDERS
25 | format = processMultiChatPlaceholders(uuid, format);
26 |
27 | // Adds the message on the end, respecting any changes from other plugins.
28 | return format + "%2$s"; // TODO This bit should not be added here, should be added in a different part (As sponge does not add here)
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/MultiChatLocalSpigotPlayer.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot;
2 |
3 | import java.util.UUID;
4 |
5 | import org.bukkit.entity.Player;
6 |
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
8 | import xyz.olivermartin.multichat.local.spigot.commands.MultiChatLocalSpigotCommandSender;
9 |
10 | public class MultiChatLocalSpigotPlayer extends MultiChatLocalSpigotCommandSender implements MultiChatLocalPlayer {
11 |
12 | private Player player;
13 |
14 | public MultiChatLocalSpigotPlayer(Player player) {
15 | super(player);
16 | this.player = player;
17 | }
18 |
19 | @Override
20 | public UUID getUniqueId() {
21 | return player.getUniqueId();
22 | }
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/commands/MultiChatLocalSpigotCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.commands;
2 |
3 | import org.bukkit.command.Command;
4 | import org.bukkit.command.CommandExecutor;
5 | import org.bukkit.command.CommandSender;
6 |
7 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommand;
8 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
9 |
10 | public class MultiChatLocalSpigotCommand extends MultiChatLocalCommand implements CommandExecutor {
11 |
12 | @Override
13 | public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
14 |
15 | if (!command.getName().equalsIgnoreCase("multichatlocal")) return false;
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpigotCommandSender(sender);
18 |
19 | return executeMultiChatLocalCommand(mccs, args);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/commands/MultiChatLocalSpigotCommandSender.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.commands;
2 |
3 | import org.bukkit.command.CommandSender;
4 | import org.bukkit.entity.Player;
5 |
6 | import net.md_5.bungee.api.ChatColor;
7 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
8 |
9 | public class MultiChatLocalSpigotCommandSender implements MultiChatLocalCommandSender {
10 |
11 | private CommandSender sender;
12 |
13 | public MultiChatLocalSpigotCommandSender(CommandSender sender) {
14 | this.sender = sender;
15 | }
16 |
17 | @Override
18 | public void sendGoodMessage(String message) {
19 | sender.sendMessage(ChatColor.GREEN + message);
20 | }
21 |
22 | @Override
23 | public void sendBadMessage(String message) {
24 | sender.sendMessage(ChatColor.DARK_RED + message);
25 | }
26 |
27 | @Override
28 | public boolean hasPermission(String permission) {
29 | return sender.hasPermission(permission);
30 | }
31 |
32 | @Override
33 | public boolean isPlayer() {
34 | return (sender instanceof Player);
35 | }
36 |
37 | @Override
38 | public void sendInfoMessageA(String message) {
39 | sender.sendMessage(ChatColor.DARK_AQUA + message);
40 | }
41 |
42 | @Override
43 | public void sendInfoMessageB(String message) {
44 | sender.sendMessage(ChatColor.AQUA + message);
45 | }
46 |
47 | @Override
48 | public String getName() {
49 | return sender.getName();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/commands/SpigotNickCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.commands;
2 |
3 | import org.bukkit.command.Command;
4 | import org.bukkit.command.CommandExecutor;
5 | import org.bukkit.command.CommandSender;
6 | import org.bukkit.entity.Player;
7 |
8 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
9 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
10 | import xyz.olivermartin.multichat.local.common.commands.NickCommand;
11 | import xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlayer;
12 |
13 | public class SpigotNickCommand extends NickCommand implements CommandExecutor {
14 |
15 | @Override
16 | public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
17 |
18 | if (!command.getName().equalsIgnoreCase("nick")) return false;
19 |
20 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpigotCommandSender(sender);
21 |
22 | if (!mccs.isPlayer()) {
23 | mccs.sendBadMessage("Only players can use this command!");
24 | return true;
25 | }
26 |
27 | MultiChatLocalPlayer senderPlayer = new MultiChatLocalSpigotPlayer((Player)sender);
28 |
29 | if (args.length < 1 || args.length > 2) {
30 | return false;
31 | }
32 |
33 | MultiChatLocalPlayer targetPlayer;
34 |
35 | if (args.length == 1) {
36 |
37 | targetPlayer = senderPlayer;
38 |
39 | return executeNickCommand(targetPlayer, senderPlayer, args[0]);
40 |
41 | } else {
42 |
43 | Player target = sender.getServer().getPlayer(args[0]);
44 |
45 | if (target == null) {
46 | mccs.sendBadMessage(args[0] + " is not currently online so cannot be nicknamed!");
47 | return true;
48 | }
49 |
50 | targetPlayer = new MultiChatLocalSpigotPlayer(target);
51 |
52 | return executeNickCommand(targetPlayer, senderPlayer, args[1]);
53 |
54 | }
55 |
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/commands/SpigotProxyExecuteCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.commands;
2 |
3 | import org.bukkit.command.Command;
4 | import org.bukkit.command.CommandExecutor;
5 | import org.bukkit.command.CommandSender;
6 |
7 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
8 | import xyz.olivermartin.multichat.local.common.commands.ProxyExecuteCommand;
9 |
10 | public class SpigotProxyExecuteCommand extends ProxyExecuteCommand implements CommandExecutor {
11 |
12 | @Override
13 | public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
14 |
15 | if (! (command.getName().equalsIgnoreCase("pxe") || command.getName().equalsIgnoreCase("pexecute"))) return false;
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpigotCommandSender(sender);
18 |
19 | return executeProxyExecuteCommand(mccs, args);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/commands/SpigotRealnameCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.commands;
2 |
3 | import org.bukkit.command.Command;
4 | import org.bukkit.command.CommandExecutor;
5 | import org.bukkit.command.CommandSender;
6 |
7 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
8 | import xyz.olivermartin.multichat.local.common.commands.RealnameCommand;
9 |
10 | public class SpigotRealnameCommand extends RealnameCommand implements CommandExecutor {
11 |
12 | @Override
13 | public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
14 |
15 | if (!command.getName().equalsIgnoreCase("realname")) return false;
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpigotCommandSender(sender);
18 |
19 | return executeRealnameCommand(mccs, args);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/commands/SpigotUsernameCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.commands;
2 |
3 | import org.bukkit.command.Command;
4 | import org.bukkit.command.CommandExecutor;
5 | import org.bukkit.command.CommandSender;
6 |
7 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
8 | import xyz.olivermartin.multichat.local.common.commands.UsernameCommand;
9 |
10 | public class SpigotUsernameCommand extends UsernameCommand implements CommandExecutor {
11 |
12 | @Override
13 | public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
14 |
15 | if (!command.getName().equalsIgnoreCase("username")) return false;
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpigotCommandSender(sender);
18 |
19 | return executeUsernameCommand(mccs, args);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/hooks/LocalSpigotPAPIHook.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.hooks;
2 |
3 | public class LocalSpigotPAPIHook {
4 |
5 | private static LocalSpigotPAPIHook instance;
6 |
7 | static {
8 | instance = new LocalSpigotPAPIHook();
9 | }
10 |
11 | public static LocalSpigotPAPIHook getInstance() {
12 | return instance;
13 | }
14 |
15 | // END STATIC
16 |
17 | private boolean hooked;
18 |
19 | private LocalSpigotPAPIHook() {
20 | hooked = false;
21 | }
22 |
23 | public boolean isHooked() {
24 | return hooked;
25 | }
26 |
27 | public void hook() {
28 | hooked = true;
29 | }
30 |
31 | public void unHook() {
32 | hooked = false;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/hooks/LocalSpigotVaultHook.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.hooks;
2 |
3 | import java.util.Optional;
4 |
5 | import net.milkbowl.vault.chat.Chat;
6 |
7 | public class LocalSpigotVaultHook {
8 |
9 | private static LocalSpigotVaultHook instance;
10 |
11 | static {
12 | instance = new LocalSpigotVaultHook();
13 | }
14 |
15 | public static LocalSpigotVaultHook getInstance() {
16 | return instance;
17 | }
18 |
19 | // END STATIC
20 |
21 | private boolean hooked;
22 |
23 | private Chat vaultChat;
24 |
25 | private LocalSpigotVaultHook() {
26 | hooked = false;
27 | }
28 |
29 | public boolean isHooked() {
30 | return hooked;
31 | }
32 |
33 | public void hook(Chat vaultChat) {
34 | hooked = true;
35 | this.vaultChat = vaultChat;
36 | }
37 |
38 | public void unHook() {
39 | hooked = false;
40 | this.vaultChat = null;
41 | }
42 |
43 | public Optional getHook() {
44 | if (!hooked) return Optional.empty();
45 | return Optional.of(vaultChat);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/LocalSpigotLoginLogoutListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners;
2 |
3 | import org.bukkit.Bukkit;
4 | import org.bukkit.event.EventHandler;
5 | import org.bukkit.event.Listener;
6 | import org.bukkit.event.player.PlayerJoinEvent;
7 | import org.bukkit.event.player.PlayerQuitEvent;
8 |
9 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
10 | import xyz.olivermartin.multichat.local.common.listeners.LocalLoginLogoutListener;
11 | import xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlayer;
12 |
13 | public class LocalSpigotLoginLogoutListener extends LocalLoginLogoutListener implements Listener {
14 |
15 | @EventHandler
16 | public void onLogin(final PlayerJoinEvent event) {
17 | MultiChatLocalPlayer mclp = new MultiChatLocalSpigotPlayer(event.getPlayer());
18 | handleLoginEvent(mclp);
19 | }
20 |
21 | @EventHandler
22 | public void onLogout(PlayerQuitEvent event) {
23 | MultiChatLocalPlayer mclp = new MultiChatLocalSpigotPlayer(event.getPlayer());
24 | handleLogoutEvent(mclp);
25 | }
26 |
27 | @Override
28 | protected boolean isPlayerStillOnline(MultiChatLocalPlayer player) {
29 | return (Bukkit.getServer().getPlayer(player.getUniqueId()) != null);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/LocalSpigotWorldChangeListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners;
2 |
3 | import org.bukkit.event.EventHandler;
4 | import org.bukkit.event.Listener;
5 | import org.bukkit.event.player.PlayerChangedWorldEvent;
6 |
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
8 | import xyz.olivermartin.multichat.local.common.listeners.LocalWorldChangeListener;
9 | import xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlayer;
10 |
11 | public class LocalSpigotWorldChangeListener extends LocalWorldChangeListener implements Listener{
12 |
13 | @EventHandler
14 | public void onWorldChange(final PlayerChangedWorldEvent event) {
15 |
16 | MultiChatLocalPlayer mclp = new MultiChatLocalSpigotPlayer(event.getPlayer());
17 | String world = event.getPlayer().getWorld().getName();
18 | updatePlayerWorld(mclp, world);
19 |
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/SpigotBungeeMessage.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners;
2 |
3 | import java.io.ByteArrayInputStream;
4 | import java.io.DataInputStream;
5 | import java.io.IOException;
6 |
7 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
8 |
9 | public class SpigotBungeeMessage implements LocalBungeeMessage {
10 |
11 | DataInputStream in;
12 |
13 | public SpigotBungeeMessage(byte[] message) {
14 | ByteArrayInputStream stream = new ByteArrayInputStream(message);
15 | this.in = new DataInputStream(stream);
16 | }
17 |
18 | @Override
19 | public String readUTF() throws IOException {
20 | return in.readUTF();
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/SpigotBungeeObjectMessage.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners;
2 |
3 | import java.io.ByteArrayInputStream;
4 | import java.io.IOException;
5 | import java.io.ObjectInputStream;
6 |
7 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
8 |
9 | public class SpigotBungeeObjectMessage implements LocalBungeeObjectMessage {
10 |
11 | ObjectInputStream in;
12 |
13 | public SpigotBungeeObjectMessage(byte[] message) throws IOException {
14 | ByteArrayInputStream stream = new ByteArrayInputStream(message);
15 | this.in = new ObjectInputStream(stream);
16 | }
17 |
18 | @Override
19 | public String readUTF() throws IOException {
20 | return in.readUTF();
21 | }
22 |
23 | @Override
24 | public Object readObject() throws ClassNotFoundException, IOException {
25 | return in.readObject();
26 | }
27 |
28 | @Override
29 | public boolean readBoolean() throws IOException {
30 | return in.readBoolean();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/chat/LocalSpigotChatListenerHighest.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.chat;
2 |
3 | import org.bukkit.event.EventHandler;
4 | import org.bukkit.event.EventPriority;
5 | import org.bukkit.event.Listener;
6 | import org.bukkit.event.player.AsyncPlayerChatEvent;
7 |
8 | import xyz.olivermartin.multichat.local.common.listeners.chat.LocalChatListenerHighest;
9 | import xyz.olivermartin.multichat.local.common.listeners.chat.MultiChatLocalPlayerChatEvent;
10 |
11 | public class LocalSpigotChatListenerHighest extends LocalChatListenerHighest implements Listener {
12 |
13 | @EventHandler(priority=EventPriority.HIGHEST)
14 | public void onChat(final AsyncPlayerChatEvent event) {
15 |
16 | MultiChatLocalPlayerChatEvent mcce = new MultiChatLocalSpigotPlayerChatEvent(event);
17 | handleChat(mcce);
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/chat/LocalSpigotChatListenerLowest.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.chat;
2 |
3 | import org.bukkit.event.EventHandler;
4 | import org.bukkit.event.EventPriority;
5 | import org.bukkit.event.Listener;
6 | import org.bukkit.event.player.AsyncPlayerChatEvent;
7 |
8 | import xyz.olivermartin.multichat.local.common.listeners.chat.LocalChatListenerLowest;
9 | import xyz.olivermartin.multichat.local.common.listeners.chat.MultiChatLocalPlayerChatEvent;
10 |
11 | public class LocalSpigotChatListenerLowest extends LocalChatListenerLowest implements Listener {
12 |
13 | @EventHandler(priority=EventPriority.LOWEST)
14 | public void onChat(final AsyncPlayerChatEvent event) {
15 |
16 | MultiChatLocalPlayerChatEvent mcce = new MultiChatLocalSpigotPlayerChatEvent(event);
17 | handleChat(mcce);
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/chat/LocalSpigotChatListenerMonitor.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.chat;
2 |
3 | import org.bukkit.event.EventHandler;
4 | import org.bukkit.event.EventPriority;
5 | import org.bukkit.event.Listener;
6 | import org.bukkit.event.player.AsyncPlayerChatEvent;
7 |
8 | import xyz.olivermartin.multichat.local.common.listeners.chat.LocalChatListenerMonitor;
9 | import xyz.olivermartin.multichat.local.common.listeners.chat.MultiChatLocalPlayerChatEvent;
10 |
11 | public class LocalSpigotChatListenerMonitor extends LocalChatListenerMonitor implements Listener {
12 |
13 | @EventHandler(priority=EventPriority.MONITOR)
14 | public void onChat(final AsyncPlayerChatEvent event) {
15 |
16 | MultiChatLocalPlayerChatEvent mcce = new MultiChatLocalSpigotPlayerChatEvent(event);
17 | handleChat(mcce);
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/communication/LocalSpigotActionListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.communication;
2 |
3 | import org.bukkit.Bukkit;
4 | import org.bukkit.entity.Player;
5 | import org.bukkit.plugin.messaging.PluginMessageListener;
6 |
7 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
8 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalActionListener;
9 | import xyz.olivermartin.multichat.local.spigot.listeners.SpigotBungeeMessage;
10 |
11 | public class LocalSpigotActionListener extends LocalActionListener implements PluginMessageListener {
12 |
13 | @Override
14 | public void onPluginMessageReceived(String channel, Player player, byte[] message) {
15 |
16 | if (!channel.equals("multichat:act")) return;
17 |
18 | LocalBungeeMessage lbm = new SpigotBungeeMessage(message);
19 |
20 | handleMessage(lbm);
21 |
22 | }
23 |
24 | @Override
25 | protected void executeCommandAsConsole(String command) {
26 | Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), command);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/communication/LocalSpigotCastListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.communication;
2 |
3 | import org.bukkit.Bukkit;
4 | import org.bukkit.ChatColor;
5 | import org.bukkit.entity.Player;
6 | import org.bukkit.plugin.messaging.PluginMessageListener;
7 |
8 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
9 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalCastListener;
10 | import xyz.olivermartin.multichat.local.spigot.listeners.SpigotBungeeMessage;
11 |
12 | public class LocalSpigotCastListener extends LocalCastListener implements PluginMessageListener {
13 |
14 | @Override
15 | public void onPluginMessageReceived(String channel, Player player, byte[] message) {
16 |
17 | if (!channel.equals("multichat:chat")) return;
18 |
19 | LocalBungeeMessage lbm = new SpigotBungeeMessage(message);
20 |
21 | handleMessage(lbm);
22 |
23 | }
24 |
25 | @Override
26 | protected void broadcastRawMessageToChat(String message) {
27 | Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', message));
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/communication/LocalSpigotIgnoreListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.communication;
2 |
3 | import java.io.IOException;
4 |
5 | import org.bukkit.entity.Player;
6 | import org.bukkit.plugin.messaging.PluginMessageListener;
7 |
8 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
9 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
10 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalIgnoreListener;
11 | import xyz.olivermartin.multichat.local.spigot.listeners.SpigotBungeeObjectMessage;
12 |
13 | public class LocalSpigotIgnoreListener extends LocalIgnoreListener implements PluginMessageListener {
14 |
15 | @Override
16 | public void onPluginMessageReceived(String channel, Player player, byte[] message) {
17 |
18 | if (!channel.equals("multichat:ignore")) return;
19 |
20 | try {
21 | LocalBungeeObjectMessage lbm = new SpigotBungeeObjectMessage(message);
22 |
23 | handleMessage(lbm);
24 |
25 | } catch (IOException e) {
26 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred reading the object stream in the local ignore listener...");
27 | return;
28 | }
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/communication/LocalSpigotPlayerActionListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.communication;
2 |
3 | import org.bukkit.Bukkit;
4 | import org.bukkit.entity.Player;
5 | import org.bukkit.plugin.messaging.PluginMessageListener;
6 |
7 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
8 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalPlayerActionListener;
9 | import xyz.olivermartin.multichat.local.spigot.listeners.SpigotBungeeMessage;
10 |
11 | public class LocalSpigotPlayerActionListener extends LocalPlayerActionListener implements PluginMessageListener {
12 |
13 | @Override
14 | public void onPluginMessageReceived(String channel, Player player, byte[] message) {
15 |
16 | if (!channel.equals("multichat:pact")) return;
17 |
18 | LocalBungeeMessage lbm = new SpigotBungeeMessage(message);
19 |
20 | handleMessage(lbm);
21 |
22 | }
23 |
24 | @Override
25 | protected void executeCommandForPlayersMatchingRegex(String playerRegex, String command) {
26 |
27 | for (Player p : Bukkit.getServer().getOnlinePlayers()) {
28 |
29 | if (p.getName().matches(playerRegex)) {
30 | Bukkit.getServer().dispatchCommand(p, command);
31 | }
32 |
33 | }
34 |
35 | }
36 |
37 | @Override
38 | protected void sendChatAsPlayer(String playerName, String rawMessage) {
39 | Bukkit.getServer().getPlayer(playerName).chat(rawMessage);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/communication/LocalSpigotPlayerChannelListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.communication;
2 |
3 | import java.io.IOException;
4 | import java.util.Optional;
5 |
6 | import org.bukkit.Bukkit;
7 | import org.bukkit.entity.Player;
8 | import org.bukkit.plugin.messaging.PluginMessageListener;
9 |
10 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
11 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
12 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
13 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalPlayerChannelListener;
14 | import xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlayer;
15 | import xyz.olivermartin.multichat.local.spigot.listeners.SpigotBungeeObjectMessage;
16 |
17 | public class LocalSpigotPlayerChannelListener extends LocalPlayerChannelListener implements PluginMessageListener {
18 |
19 | @Override
20 | public void onPluginMessageReceived(String channel, Player player, byte[] message) {
21 |
22 | if (!channel.equals("multichat:ch")) return;
23 |
24 | try {
25 | LocalBungeeObjectMessage lbm = new SpigotBungeeObjectMessage(message);
26 |
27 | handleMessage(lbm);
28 |
29 | } catch (IOException e) {
30 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred reading the object stream in the local channel listener...");
31 | return;
32 | }
33 |
34 | }
35 |
36 | @Override
37 | protected Optional getPlayerFromName(String playername) {
38 |
39 | Player bukkitPlayer;
40 |
41 | bukkitPlayer = Bukkit.getPlayer(playername);
42 |
43 | if (bukkitPlayer == null) {
44 | return Optional.empty();
45 | } else {
46 | return Optional.of(new MultiChatLocalSpigotPlayer(bukkitPlayer));
47 | }
48 |
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/spigot/listeners/communication/LocalSpigotPlayerMetaListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.spigot.listeners.communication;
2 |
3 | import java.util.Optional;
4 |
5 | import org.bukkit.Bukkit;
6 | import org.bukkit.entity.Player;
7 | import org.bukkit.plugin.messaging.PluginMessageListener;
8 |
9 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
10 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
11 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalPlayerMetaListener;
12 | import xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlayer;
13 | import xyz.olivermartin.multichat.local.spigot.listeners.SpigotBungeeMessage;
14 |
15 | public class LocalSpigotPlayerMetaListener extends LocalPlayerMetaListener implements PluginMessageListener {
16 |
17 | @Override
18 | public void onPluginMessageReceived(String channel, Player player, byte[] message) {
19 |
20 | if (!channel.equals("multichat:comm")) return;
21 |
22 | LocalBungeeMessage lbm = new SpigotBungeeMessage(message);
23 |
24 | handleMessage(lbm);
25 |
26 | }
27 |
28 | @Override
29 | protected Optional getPlayerFromName(String playername) {
30 |
31 | Player bukkitPlayer;
32 |
33 | bukkitPlayer = Bukkit.getPlayer(playername);
34 |
35 | if (bukkitPlayer == null) {
36 | return Optional.empty();
37 | } else {
38 | return Optional.of(new MultiChatLocalSpigotPlayer(bukkitPlayer));
39 | }
40 |
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongeChatManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongeChatManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongeConsoleLogger.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge;
2 |
3 | import org.spongepowered.api.Sponge;
4 | import org.spongepowered.api.text.serializer.TextSerializers;
5 |
6 | import xyz.olivermartin.multichat.local.common.LocalConsoleLogger;
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlatform;
8 |
9 | public class LocalSpongeConsoleLogger extends LocalConsoleLogger {
10 |
11 | protected LocalSpongeConsoleLogger() {
12 | super(MultiChatLocalPlatform.SPONGE);
13 | }
14 |
15 | @Override
16 | protected void displayMessageUsingLogger(String message) {
17 | System.out.println(message);
18 | }
19 |
20 | @Override
21 | protected void sendColouredMessageToConsoleSender(String message) {
22 | Sponge.getServer().getConsole().sendMessage(TextSerializers.FORMATTING_CODE.deserialize(message));
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongeMetaManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongeMetaManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongePlaceholderManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/LocalSpongePlaceholderManager.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/MultiChatLocalSpongePlayer.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge;
2 |
3 | import java.util.UUID;
4 |
5 | import org.spongepowered.api.entity.living.player.Player;
6 |
7 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
8 | import xyz.olivermartin.multichat.local.sponge.commands.MultiChatLocalSpongeCommandSender;
9 |
10 | public class MultiChatLocalSpongePlayer extends MultiChatLocalSpongeCommandSender implements MultiChatLocalPlayer {
11 |
12 | private Player player;
13 |
14 | public MultiChatLocalSpongePlayer(Player player) {
15 | super(player);
16 | this.player = player;
17 | }
18 |
19 | @Override
20 | public UUID getUniqueId() {
21 | return player.getUniqueId();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/commands/MultiChatLocalSpongeCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.commands;
2 |
3 | import org.spongepowered.api.command.CommandException;
4 | import org.spongepowered.api.command.CommandResult;
5 | import org.spongepowered.api.command.CommandSource;
6 | import org.spongepowered.api.command.args.CommandContext;
7 | import org.spongepowered.api.command.spec.CommandExecutor;
8 |
9 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommand;
10 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
11 |
12 | public class MultiChatLocalSpongeCommand extends MultiChatLocalCommand implements CommandExecutor {
13 |
14 | @Override
15 | public CommandResult execute(CommandSource sender, CommandContext args) throws CommandException {
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpongeCommandSender(sender);
18 |
19 | String[] strArgs = new String[1];
20 | strArgs[0] = args.getOne("command").get();
21 |
22 | boolean status = executeMultiChatLocalCommand(mccs, strArgs);
23 |
24 | if (status) {
25 | return CommandResult.success();
26 | } else {
27 | mccs.sendBadMessage("Usage: /multichatlocal ");
28 | return CommandResult.empty();
29 | }
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/commands/MultiChatLocalSpongeCommandSender.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.commands;
2 |
3 | import org.spongepowered.api.command.CommandSource;
4 | import org.spongepowered.api.entity.living.player.Player;
5 | import org.spongepowered.api.text.serializer.TextSerializers;
6 |
7 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
8 |
9 | public class MultiChatLocalSpongeCommandSender implements MultiChatLocalCommandSender {
10 |
11 | private CommandSource sender;
12 |
13 | public MultiChatLocalSpongeCommandSender(CommandSource sender) {
14 | this.sender = sender;
15 | }
16 |
17 | @Override
18 | public void sendGoodMessage(String message) {
19 | sender.sendMessage(TextSerializers.FORMATTING_CODE.deserialize("&a" + message));
20 | }
21 |
22 | @Override
23 | public void sendBadMessage(String message) {
24 | sender.sendMessage(TextSerializers.FORMATTING_CODE.deserialize("&c" + message));
25 | }
26 |
27 | @Override
28 | public void sendInfoMessageA(String message) {
29 | sender.sendMessage(TextSerializers.FORMATTING_CODE.deserialize("&3" + message));
30 | }
31 |
32 | @Override
33 | public void sendInfoMessageB(String message) {
34 | sender.sendMessage(TextSerializers.FORMATTING_CODE.deserialize("&b" + message));
35 | }
36 |
37 | @Override
38 | public boolean hasPermission(String permission) {
39 | return sender.hasPermission(permission);
40 | }
41 |
42 | @Override
43 | public boolean isPlayer() {
44 | return (sender instanceof Player);
45 | }
46 |
47 | @Override
48 | public String getName() {
49 | return sender.getName();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/commands/SpongeNickCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.commands;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.command.CommandException;
6 | import org.spongepowered.api.command.CommandResult;
7 | import org.spongepowered.api.command.CommandSource;
8 | import org.spongepowered.api.command.args.CommandContext;
9 | import org.spongepowered.api.command.spec.CommandExecutor;
10 | import org.spongepowered.api.entity.living.player.Player;
11 |
12 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
13 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
14 | import xyz.olivermartin.multichat.local.common.commands.NickCommand;
15 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
16 |
17 | public class SpongeNickCommand extends NickCommand implements CommandExecutor {
18 |
19 | @Override
20 | public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
21 |
22 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpongeCommandSender(src);
23 |
24 | if (!mccs.isPlayer()) {
25 | mccs.sendBadMessage("Only players can use this command!");
26 | return CommandResult.success();
27 | }
28 |
29 | MultiChatLocalPlayer senderPlayer = new MultiChatLocalSpongePlayer((Player)src);
30 |
31 | Optional opTarget = args.getOne("player");
32 |
33 | if (!opTarget.isPresent()) {
34 | mccs.sendBadMessage("That player could not be found!");
35 | return CommandResult.success();
36 | }
37 |
38 | Player target = opTarget.get();
39 |
40 | if (target == null) {
41 | mccs.sendBadMessage("That player could not be found!");
42 | return CommandResult.success();
43 | }
44 |
45 | String nickname = args.getOne("message").get();
46 |
47 | MultiChatLocalPlayer targetPlayer = new MultiChatLocalSpongePlayer(target);
48 |
49 | boolean status = executeNickCommand(targetPlayer, senderPlayer, nickname);
50 |
51 | if (status) {
52 | return CommandResult.success();
53 | } else {
54 | mccs.sendBadMessage("Usage: /nick ");
55 | return CommandResult.empty();
56 | }
57 |
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/commands/SpongeProxyExecuteCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.commands;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.command.CommandException;
6 | import org.spongepowered.api.command.CommandResult;
7 | import org.spongepowered.api.command.CommandSource;
8 | import org.spongepowered.api.command.args.CommandContext;
9 | import org.spongepowered.api.command.spec.CommandExecutor;
10 |
11 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
12 | import xyz.olivermartin.multichat.local.common.commands.ProxyExecuteCommand;
13 |
14 | public class SpongeProxyExecuteCommand extends ProxyExecuteCommand implements CommandExecutor {
15 |
16 | @Override
17 | public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
18 |
19 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpongeCommandSender(src);
20 |
21 | Optional opArgs = args.getOne("message");
22 | String[] strArgs;
23 |
24 | if (opArgs.isPresent()) {
25 | strArgs = opArgs.get().split(" ");
26 | } else {
27 | mccs.sendBadMessage("Usage: /pexecute [-p ] ");
28 | return CommandResult.success();
29 | }
30 |
31 | boolean status = executeProxyExecuteCommand(mccs, strArgs);
32 |
33 | if (status) {
34 | return CommandResult.success();
35 | } else {
36 | mccs.sendBadMessage("Usage: /pexecute [-p ] ");
37 | return CommandResult.empty();
38 | }
39 |
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/commands/SpongeRealnameCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.commands;
2 |
3 | import org.spongepowered.api.command.CommandException;
4 | import org.spongepowered.api.command.CommandResult;
5 | import org.spongepowered.api.command.CommandSource;
6 | import org.spongepowered.api.command.args.CommandContext;
7 | import org.spongepowered.api.command.spec.CommandExecutor;
8 |
9 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
10 | import xyz.olivermartin.multichat.local.common.commands.RealnameCommand;
11 |
12 | public class SpongeRealnameCommand extends RealnameCommand implements CommandExecutor {
13 |
14 | @Override
15 | public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpongeCommandSender(src);
18 |
19 | String[] strArgs = new String[1];
20 | strArgs[0] = args.getOne("nickname").get();
21 |
22 | boolean status = executeRealnameCommand(mccs, strArgs);
23 |
24 | if (status) {
25 | return CommandResult.success();
26 | } else {
27 | mccs.sendBadMessage("Usage: /realname ");
28 | return CommandResult.empty();
29 | }
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/commands/SpongeUsernameCommand.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.commands;
2 |
3 | import org.spongepowered.api.command.CommandException;
4 | import org.spongepowered.api.command.CommandResult;
5 | import org.spongepowered.api.command.CommandSource;
6 | import org.spongepowered.api.command.args.CommandContext;
7 | import org.spongepowered.api.command.spec.CommandExecutor;
8 |
9 | import xyz.olivermartin.multichat.local.common.commands.MultiChatLocalCommandSender;
10 | import xyz.olivermartin.multichat.local.common.commands.UsernameCommand;
11 |
12 | public class SpongeUsernameCommand extends UsernameCommand implements CommandExecutor {
13 |
14 | @Override
15 | public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
16 |
17 | MultiChatLocalCommandSender mccs = new MultiChatLocalSpongeCommandSender(src);
18 |
19 | String[] strArgs = new String[1];
20 | strArgs[0] = args.getOne("username").get();
21 |
22 | boolean status = executeUsernameCommand(mccs, strArgs);
23 |
24 | if (status) {
25 | return CommandResult.success();
26 | } else {
27 | mccs.sendBadMessage("Usage: /username ");
28 | return CommandResult.empty();
29 | }
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/hooks/LocalSpongePAPIHook.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.hooks;
2 |
3 | import java.util.Optional;
4 |
5 | import me.rojo8399.placeholderapi.PlaceholderService;
6 |
7 | public class LocalSpongePAPIHook {
8 |
9 | private static LocalSpongePAPIHook instance;
10 |
11 | static {
12 | instance = new LocalSpongePAPIHook();
13 | }
14 |
15 | public static LocalSpongePAPIHook getInstance() {
16 | return instance;
17 | }
18 |
19 | // END STATIC
20 |
21 | private boolean hooked;
22 |
23 | private PlaceholderService papi;
24 |
25 | private LocalSpongePAPIHook() {
26 | hooked = false;
27 | }
28 |
29 | public boolean isHooked() {
30 | return hooked;
31 | }
32 |
33 | public void hook(PlaceholderService papi) {
34 | hooked = true;
35 | this.papi = papi;
36 | }
37 |
38 | public void unHook() {
39 | hooked = false;
40 | this.papi = null;
41 | }
42 |
43 | public Optional getHook() {
44 | if (!hooked) return Optional.empty();
45 | return Optional.of(papi);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/LocalSpongeLoginLogoutListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.Sponge;
6 | import org.spongepowered.api.entity.living.player.Player;
7 | import org.spongepowered.api.event.Listener;
8 | import org.spongepowered.api.event.Order;
9 | import org.spongepowered.api.event.filter.cause.Root;
10 | import org.spongepowered.api.event.network.ClientConnectionEvent;
11 |
12 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
13 | import xyz.olivermartin.multichat.local.common.listeners.LocalLoginLogoutListener;
14 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
15 |
16 | public class LocalSpongeLoginLogoutListener extends LocalLoginLogoutListener {
17 |
18 | @Listener(order=Order.POST)
19 | public void onJoin(ClientConnectionEvent.Join event, @Root Player player) {
20 | MultiChatLocalPlayer mclp = new MultiChatLocalSpongePlayer(player);
21 | handleLoginEvent(mclp);
22 | }
23 |
24 | @Listener(order=Order.POST)
25 | public void onLogout(ClientConnectionEvent.Disconnect event) {
26 | Optional playerOptional = event.getCause().first(Player.class);
27 | if (playerOptional.isPresent()) {
28 | MultiChatLocalPlayer mclp = new MultiChatLocalSpongePlayer(playerOptional.get());
29 | handleLogoutEvent(mclp);
30 | }
31 | }
32 |
33 |
34 | @Override
35 | protected boolean isPlayerStillOnline(MultiChatLocalPlayer player) {
36 | if (Sponge.getServer().getPlayer(player.getUniqueId()).isPresent()) {
37 | return true;
38 | } else {
39 | return false;
40 | }
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/LocalSpongeWorldChangeListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners;
2 |
3 | import org.spongepowered.api.entity.living.player.Player;
4 | import org.spongepowered.api.event.Listener;
5 | import org.spongepowered.api.event.Order;
6 | import org.spongepowered.api.event.entity.MoveEntityEvent;
7 | import org.spongepowered.api.event.filter.cause.Root;
8 |
9 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
10 | import xyz.olivermartin.multichat.local.common.listeners.LocalWorldChangeListener;
11 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
12 |
13 | public class LocalSpongeWorldChangeListener extends LocalWorldChangeListener {
14 |
15 | @Listener(order=Order.POST)
16 | public void onWorldChange(MoveEntityEvent.Teleport event, @Root Player player) {
17 |
18 | String oldWorld = event.getFromTransform().getExtent().getName();
19 | String newWorld = event.getToTransform().getExtent().getName();
20 |
21 | if (oldWorld.equals(newWorld)) {
22 | return;
23 | }
24 |
25 | MultiChatLocalPlayer mclp = new MultiChatLocalSpongePlayer(player);
26 | updatePlayerWorld(mclp, newWorld);
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/SpongeBungeeMessage.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners;
2 |
3 | import java.io.IOException;
4 |
5 | import org.spongepowered.api.network.ChannelBuf;
6 |
7 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
8 |
9 | public class SpongeBungeeMessage implements LocalBungeeMessage {
10 |
11 | private ChannelBuf data;
12 |
13 | public SpongeBungeeMessage(ChannelBuf data) {
14 | this.data = data;
15 | }
16 |
17 | @Override
18 | public String readUTF() throws IOException {
19 | return data.readUTF();
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/SpongeBungeeObjectMessage.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners;
2 |
3 | import java.io.ByteArrayInputStream;
4 | import java.io.ByteArrayOutputStream;
5 | import java.io.IOException;
6 | import java.io.ObjectInputStream;
7 |
8 | import org.spongepowered.api.network.ChannelBuf;
9 |
10 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
11 |
12 | public class SpongeBungeeObjectMessage implements LocalBungeeObjectMessage {
13 |
14 | private ObjectInputStream in;
15 |
16 | public SpongeBungeeObjectMessage(ChannelBuf data) throws IOException {
17 |
18 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
19 |
20 | while (data.available() > 0) {
21 | try {
22 | outputStream.write(data.readBytes(1));
23 | } catch (IOException e) {
24 | e.printStackTrace();
25 | }
26 | }
27 |
28 | ByteArrayInputStream stream = new ByteArrayInputStream(outputStream.toByteArray());
29 |
30 | this.in = new ObjectInputStream(stream);
31 |
32 | }
33 |
34 | @Override
35 | public String readUTF() throws IOException {
36 | return in.readUTF();
37 | }
38 |
39 | @Override
40 | public Object readObject() throws ClassNotFoundException, IOException {
41 | return in.readObject();
42 | }
43 |
44 | @Override
45 | public boolean readBoolean() throws IOException {
46 | return in.readBoolean();
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/SpongeGameReloadEvent.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners;
2 |
3 | import org.spongepowered.api.event.Listener;
4 | import org.spongepowered.api.event.game.GameReloadEvent;
5 |
6 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
7 |
8 | public class SpongeGameReloadEvent {
9 |
10 | @Listener
11 | public void reload(GameReloadEvent event) {
12 |
13 | MultiChatLocal.getInstance().getConsoleLogger().log("Reloading MultiChatLocal config file...");
14 | MultiChatLocal.getInstance().getConfigManager().getLocalConfig().reload();
15 | MultiChatLocal.getInstance().getConsoleLogger().log("MultiChatLocal config file has been reloaded!");
16 |
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/chat/LocalSpongeChatListenerHighest.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.chat;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.entity.living.player.Player;
6 | import org.spongepowered.api.event.Listener;
7 | import org.spongepowered.api.event.Order;
8 | import org.spongepowered.api.event.message.MessageChannelEvent;
9 |
10 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
11 | import xyz.olivermartin.multichat.local.common.listeners.chat.LocalChatListenerHighest;
12 | import xyz.olivermartin.multichat.local.common.listeners.chat.MultiChatLocalPlayerChatEvent;
13 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
14 |
15 | public class LocalSpongeChatListenerHighest extends LocalChatListenerHighest {
16 |
17 | @Listener(order=Order.LAST)
18 | public void onChat(MessageChannelEvent.Chat event) {
19 |
20 | Optional playerOptional = event.getCause().first(Player.class);
21 |
22 | if (!playerOptional.isPresent()) return;
23 |
24 | MultiChatLocalPlayer player = new MultiChatLocalSpongePlayer(playerOptional.get());
25 |
26 | MultiChatLocalPlayerChatEvent mcce = new MultiChatLocalSpongePlayerChatEvent(event, player);
27 |
28 | handleChat(mcce);
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/chat/LocalSpongeChatListenerLowest.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.chat;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.entity.living.player.Player;
6 | import org.spongepowered.api.event.Listener;
7 | import org.spongepowered.api.event.Order;
8 | import org.spongepowered.api.event.message.MessageChannelEvent;
9 |
10 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
11 | import xyz.olivermartin.multichat.local.common.listeners.chat.LocalChatListenerLowest;
12 | import xyz.olivermartin.multichat.local.common.listeners.chat.MultiChatLocalPlayerChatEvent;
13 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
14 |
15 | public class LocalSpongeChatListenerLowest extends LocalChatListenerLowest {
16 |
17 | @Listener(order=Order.PRE)
18 | public void onChat(MessageChannelEvent.Chat event) {
19 |
20 | Optional playerOptional = event.getCause().first(Player.class);
21 |
22 | if (!playerOptional.isPresent()) return;
23 |
24 | MultiChatLocalPlayer player = new MultiChatLocalSpongePlayer(playerOptional.get());
25 |
26 | MultiChatLocalPlayerChatEvent mcce = new MultiChatLocalSpongePlayerChatEvent(event, player);
27 |
28 | handleChat(mcce);
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/chat/LocalSpongeChatListenerMonitor.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.chat;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.entity.living.player.Player;
6 | import org.spongepowered.api.event.Listener;
7 | import org.spongepowered.api.event.Order;
8 | import org.spongepowered.api.event.message.MessageChannelEvent;
9 |
10 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
11 | import xyz.olivermartin.multichat.local.common.listeners.chat.LocalChatListenerMonitor;
12 | import xyz.olivermartin.multichat.local.common.listeners.chat.MultiChatLocalPlayerChatEvent;
13 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
14 |
15 | public class LocalSpongeChatListenerMonitor extends LocalChatListenerMonitor {
16 |
17 | @Listener(order=Order.POST)
18 | public void onChat(MessageChannelEvent.Chat event) {
19 |
20 | Optional playerOptional = event.getCause().first(Player.class);
21 |
22 | if (!playerOptional.isPresent()) return;
23 |
24 | MultiChatLocalPlayer player = new MultiChatLocalSpongePlayer(playerOptional.get());
25 |
26 | MultiChatLocalPlayerChatEvent mcce = new MultiChatLocalSpongePlayerChatEvent(event, player);
27 |
28 | handleChat(mcce);
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/chat/MultiChatLocalSpongePlayerChatEvent.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MultiChat/Development/3d52572268ddbb511598fd8d48874aa9d053246f/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/chat/MultiChatLocalSpongePlayerChatEvent.java
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/communication/LocalSpongeActionListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.communication;
2 |
3 | import org.spongepowered.api.Platform.Type;
4 | import org.spongepowered.api.Sponge;
5 | import org.spongepowered.api.network.ChannelBuf;
6 | import org.spongepowered.api.network.RawDataListener;
7 | import org.spongepowered.api.network.RemoteConnection;
8 |
9 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
10 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalActionListener;
11 | import xyz.olivermartin.multichat.local.sponge.listeners.SpongeBungeeMessage;
12 |
13 | public class LocalSpongeActionListener extends LocalActionListener implements RawDataListener {
14 |
15 | @Override
16 | public void handlePayload(ChannelBuf data, RemoteConnection connection, Type side) {
17 |
18 | LocalBungeeMessage lbm = new SpongeBungeeMessage(data);
19 |
20 | handleMessage(lbm);
21 |
22 | }
23 |
24 | @Override
25 | protected void executeCommandAsConsole(String command) {
26 | Sponge.getCommandManager().process(Sponge.getServer().getConsole(), command);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/communication/LocalSpongeCastListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.communication;
2 |
3 | import org.spongepowered.api.Platform.Type;
4 | import org.spongepowered.api.Sponge;
5 | import org.spongepowered.api.network.ChannelBuf;
6 | import org.spongepowered.api.network.RawDataListener;
7 | import org.spongepowered.api.network.RemoteConnection;
8 | import org.spongepowered.api.text.serializer.TextSerializers;
9 |
10 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
11 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalCastListener;
12 | import xyz.olivermartin.multichat.local.sponge.listeners.SpongeBungeeMessage;
13 |
14 | public class LocalSpongeCastListener extends LocalCastListener implements RawDataListener {
15 |
16 | @Override
17 | public void handlePayload(ChannelBuf data, RemoteConnection connection, Type side) {
18 |
19 | LocalBungeeMessage lbm = new SpongeBungeeMessage(data);
20 |
21 | handleMessage(lbm);
22 |
23 | }
24 |
25 | @Override
26 | protected void broadcastRawMessageToChat(String message) {
27 | Sponge.getServer().getBroadcastChannel().send(TextSerializers.FORMATTING_CODE.deserialize(message));
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/communication/LocalSpongeIgnoreListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.communication;
2 |
3 | import java.io.IOException;
4 |
5 | import org.spongepowered.api.Platform.Type;
6 | import org.spongepowered.api.network.ChannelBuf;
7 | import org.spongepowered.api.network.RawDataListener;
8 | import org.spongepowered.api.network.RemoteConnection;
9 |
10 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
11 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
12 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalIgnoreListener;
13 | import xyz.olivermartin.multichat.local.sponge.listeners.SpongeBungeeObjectMessage;
14 |
15 | public class LocalSpongeIgnoreListener extends LocalIgnoreListener implements RawDataListener {
16 |
17 | @Override
18 | public void handlePayload(ChannelBuf data, RemoteConnection connection, Type side) {
19 |
20 | try {
21 | LocalBungeeObjectMessage lbm = new SpongeBungeeObjectMessage(data);
22 |
23 | handleMessage(lbm);
24 |
25 | } catch (IOException e) {
26 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred reading the object stream in the local ignore listener...");
27 | return;
28 | }
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/communication/LocalSpongePlayerActionListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.communication;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.Platform.Type;
6 | import org.spongepowered.api.Sponge;
7 | import org.spongepowered.api.entity.living.player.Player;
8 | import org.spongepowered.api.event.cause.Cause;
9 | import org.spongepowered.api.event.cause.EventContext;
10 | import org.spongepowered.api.event.cause.EventContextKeys;
11 | import org.spongepowered.api.network.ChannelBuf;
12 | import org.spongepowered.api.network.RawDataListener;
13 | import org.spongepowered.api.network.RemoteConnection;
14 | import org.spongepowered.api.text.Text;
15 |
16 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
17 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
18 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalPlayerActionListener;
19 | import xyz.olivermartin.multichat.local.sponge.listeners.SpongeBungeeMessage;
20 |
21 | public class LocalSpongePlayerActionListener extends LocalPlayerActionListener implements RawDataListener {
22 |
23 | @Override
24 | public void handlePayload(ChannelBuf data, RemoteConnection connection, Type side) {
25 |
26 | LocalBungeeMessage lbm = new SpongeBungeeMessage(data);
27 |
28 | handleMessage(lbm);
29 |
30 | }
31 |
32 | @Override
33 | protected void executeCommandForPlayersMatchingRegex(String playerRegex, String command) {
34 |
35 | for (Player p : Sponge.getServer().getOnlinePlayers()) {
36 |
37 | if (p.getName().matches(playerRegex)) {
38 |
39 | Sponge.getCommandManager().process(p, command);
40 |
41 | }
42 |
43 | }
44 |
45 | }
46 |
47 | @Override
48 | protected void sendChatAsPlayer(String playerName, String rawMessage) {
49 |
50 | Optional opPlayer = Sponge.getServer().getPlayer(playerName);
51 | if (opPlayer.isPresent()) {
52 | EventContext context = EventContext.builder()
53 | .add(EventContextKeys.PLAYER_SIMULATED, opPlayer.get().getProfile())
54 | .add(EventContextKeys.PLUGIN, Sponge.getPluginManager().getPlugin(MultiChatLocal.getInstance().getPluginName()).get())
55 | .build();
56 | opPlayer.get().simulateChat(Text.of(rawMessage), Cause.builder().append(opPlayer.get()).append(Sponge.getPluginManager().getPlugin(MultiChatLocal.getInstance().getPluginName()).get()).build(context));
57 | }
58 |
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/communication/LocalSpongePlayerChannelListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.communication;
2 |
3 | import java.io.IOException;
4 | import java.util.Optional;
5 |
6 | import org.spongepowered.api.Platform.Type;
7 | import org.spongepowered.api.Sponge;
8 | import org.spongepowered.api.entity.living.player.Player;
9 | import org.spongepowered.api.network.ChannelBuf;
10 | import org.spongepowered.api.network.RawDataListener;
11 | import org.spongepowered.api.network.RemoteConnection;
12 |
13 | import xyz.olivermartin.multichat.local.common.MultiChatLocal;
14 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
15 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeObjectMessage;
16 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalPlayerChannelListener;
17 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
18 | import xyz.olivermartin.multichat.local.sponge.listeners.SpongeBungeeObjectMessage;
19 |
20 | public class LocalSpongePlayerChannelListener extends LocalPlayerChannelListener implements RawDataListener {
21 |
22 | @Override
23 | public void handlePayload(ChannelBuf data, RemoteConnection connection, Type side) {
24 |
25 | try {
26 | LocalBungeeObjectMessage lbm = new SpongeBungeeObjectMessage(data);
27 |
28 | handleMessage(lbm);
29 |
30 | } catch (IOException e) {
31 | MultiChatLocal.getInstance().getConsoleLogger().log("An error occurred reading the object stream in the local channel listener...");
32 | return;
33 | }
34 |
35 | }
36 |
37 | @Override
38 | protected Optional getPlayerFromName(String playername) {
39 | Optional player = Sponge.getServer().getPlayer(playername);
40 | if (player.isPresent()) {
41 | return Optional.of(new MultiChatLocalSpongePlayer(player.get()));
42 | } else {
43 | return Optional.empty();
44 | }
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/local/sponge/listeners/communication/LocalSpongePlayerMetaListener.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.local.sponge.listeners.communication;
2 |
3 | import java.util.Optional;
4 |
5 | import org.spongepowered.api.Platform.Type;
6 | import org.spongepowered.api.Sponge;
7 | import org.spongepowered.api.entity.living.player.Player;
8 | import org.spongepowered.api.network.ChannelBuf;
9 | import org.spongepowered.api.network.RawDataListener;
10 | import org.spongepowered.api.network.RemoteConnection;
11 |
12 | import xyz.olivermartin.multichat.local.common.MultiChatLocalPlayer;
13 | import xyz.olivermartin.multichat.local.common.listeners.LocalBungeeMessage;
14 | import xyz.olivermartin.multichat.local.common.listeners.communication.LocalPlayerMetaListener;
15 | import xyz.olivermartin.multichat.local.sponge.MultiChatLocalSpongePlayer;
16 | import xyz.olivermartin.multichat.local.sponge.listeners.SpongeBungeeMessage;
17 |
18 | public class LocalSpongePlayerMetaListener extends LocalPlayerMetaListener implements RawDataListener {
19 |
20 | @Override
21 | public void handlePayload(ChannelBuf data, RemoteConnection connection, Type side) {
22 |
23 | LocalBungeeMessage lbm = new SpongeBungeeMessage(data);
24 |
25 | handleMessage(lbm);
26 |
27 | }
28 |
29 | @Override
30 | protected Optional getPlayerFromName(String playername) {
31 | Optional player = Sponge.getServer().getPlayer(playername);
32 | if (player.isPresent()) {
33 | return Optional.of(new MultiChatLocalSpongePlayer(player.get()));
34 | } else {
35 | return Optional.empty();
36 | }
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/proxy/common/MultiChatProxy.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.proxy.common;
2 |
3 | /**
4 | * This is MultiChat's API running on the network proxy server
5 | *
6 | * @author Oliver Martin (Revilo410)
7 | *
8 | */
9 | public class MultiChatProxy {
10 |
11 | private static MultiChatProxy instance;
12 |
13 | static {
14 | instance = new MultiChatProxy();
15 | }
16 |
17 | public static MultiChatProxy getInstance() {
18 | return instance;
19 | }
20 |
21 | /* END STATIC */
22 |
23 | // TODO Add attributes
24 |
25 | /* END ATTRIBUTES */
26 |
27 | private MultiChatProxy() { /* EMPTY */ }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/multichat/src/main/java/xyz/olivermartin/multichat/proxy/common/MultiChatProxyPlatform.java:
--------------------------------------------------------------------------------
1 | package xyz.olivermartin.multichat.proxy.common;
2 |
3 | public enum MultiChatProxyPlatform {
4 | BUNGEE
5 | }
6 |
--------------------------------------------------------------------------------
/multichat/src/main/resources/bungee.yml:
--------------------------------------------------------------------------------
1 | name: MultiChat
2 | main: xyz.olivermartin.multichat.bungee.MultiChat
3 | version: 1.9.6
4 | author: Revilo410
5 | api-version: 1.16
6 | softdepends: [PremiumVanish]
7 |
--------------------------------------------------------------------------------
/multichat/src/main/resources/joinmessages.yml:
--------------------------------------------------------------------------------
1 | ############################################################
2 | # +------------------------------------------------------+ #
3 | # | MultiChat | #
4 | # +------------------------------------------------------+ #
5 | ############################################################
6 |
7 | # By Revilo410
8 |
9 | ##################
10 | # DON'T EDIT #
11 | version: "1.9.6" #
12 | ##################
13 |
14 | ############################################################
15 | # +------------------------------------------------------+ #
16 | # | Join Messages | #
17 | # +------------------------------------------------------+ #
18 | ############################################################
19 |
20 | # Should network join messages be displayed?
21 |
22 | showjoin: true
23 |
24 | # Should network quit messages be displayed?
25 |
26 | showquit: true
27 |
28 | ##############################################################
29 |
30 | # USES STANDARD MINECRAFT '&X' COLOUR/FORMAT CODES
31 | # %NAME% = The name of the sender
32 |
33 | # NETWORK join message
34 |
35 | serverjoin: "&e%NAME% &ejoined the network"
36 |
37 | # NETWORK SILENT join message
38 |
39 | silentjoin: "&b&o%NAME% &b&ojoined the network silently"
40 |
41 | # NETWORK quit message
42 |
43 | networkquit: "&e%NAME% left the network"
44 |
45 | # NETWORK SILENT quit message
46 |
47 | silentquit: "&b&o%NAME% &b&oleft the network silently"
48 |
49 | ##############################################################
50 |
51 | # Should a welcome message be broadcast to the network the first time a player joins?
52 |
53 | welcome: true
54 |
55 | # Define the welcome message here
56 | # USES STANDARD MINECRAFT '&X' COLOUR/FORMAT CODES
57 | # %NAME% = The name of the sender
58 |
59 | welcome_message: "&dWelcome %NAME% to the network for the first time!"
60 |
61 | # Should a private welcome message (separate to the one above) be sent to the player the first time they join the network?
62 |
63 | private_welcome: false
64 |
65 | # Define the private welcome message here
66 | # USES STANDARD MINECRAFT '&X' COLOUR/FORMAT CODES
67 | # %NAME% = The name of the sender
68 | private_welcome_message: "&5Hi there %NAME%, please make sure you read the /rules!"
69 |
--------------------------------------------------------------------------------
/multichat/src/main/resources/plugin.yml:
--------------------------------------------------------------------------------
1 | name: MultiChat
2 | version: 1.9.6
3 | author: Revilo410
4 | main: xyz.olivermartin.multichat.local.spigot.MultiChatLocalSpigotPlugin
5 | softdepend: [Vault,PlaceholderAPI]
6 | commands:
7 | nick:
8 | description: Gives a player a nickname
9 | usage: /nick [player]
10 | permission: multichatlocal.nick.self
11 | permission-message: You do not have permission (multichatlocal.nick.self / multichatlocal.nick.others)
12 | realname:
13 | description: Gets the real name of a player from a nickname
14 | usage: /realname
15 | permission: multichatlocal.realname
16 | permission-message: You do not have permission (multichatlocal.realname)
17 | username:
18 | description: Searches for a user with the specified name
19 | usage: /username
20 | permission: multichatlocal.username
21 | permission-message: You do not have permission (multichatlocal.username)
22 | multichatlocal:
23 | description: MultiChatLocal reload, debug and migrate commands
24 | usage: /multichatlocal [reload/debug/migratetosql]
25 | permission: multichatlocal.reload
26 | permission-message: You do not have permission (multichatlocal.reload)
27 | pxe:
28 | description: Proxy Execute - Execute commands on Proxy server
29 | usage: /pxe [-p ]
30 | permission: multichatlocal.pexecute
31 | permission-message: You do not have permission (multichatlocal.pexecute)
32 | pexecute:
33 | description: Proxy Execute - Execute commands on Proxy server
34 | usage: /pexecute [-p ]
35 | permission: multichatlocal.pexecute
36 | permission-message: You do not have permission (multichatlocal.pexecute)
37 |
--------------------------------------------------------------------------------