Skip to content

Commit

Permalink
some bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lasergott committed Jan 5, 2020
1 parent e3ecf74 commit df991f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/main/java/cloud/timo/CloudNotify/CloudNotify.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void makeInstances() {
setDatabaseManager(new DatabaseManager());
setHelper(new Helper());
setPluginMessageManager(new PluginMessageManager());
setPrefix(ChatColor.translateAlternateColorCodes('&', fileManager.getConfig().getString("Prefix") + " "));
setPrefix(ChatColor.translateAlternateColorCodes('&', fileManager.getConfig().getString("Prefix")));
setCloudNotifyCommand(new CloudNotifyCommand("cloudNotify", "cloudNotify.command.notify"));
}

Expand Down Expand Up @@ -97,4 +97,9 @@ public PluginMessageManager getPluginMessageManager() {
public void setPluginMessageManager(PluginMessageManager pluginMessageManager) {
this.pluginMessageManager = pluginMessageManager;
}

public CloudNotifyCommand getCloudNotifyCommand() {
return cloudNotifyCommand;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

public class PluginMessageManager implements MessageListener {

public PluginMessageManager(){
public PluginMessageManager() {
TimoCloudAPI.getMessageAPI().registerMessageListener(this::onPluginMessage, "CLOUDNOTIFY_NOTIFICATION");
}

@Override
public void onPluginMessage(AddressedPluginMessage addressedPluginMessage) {
CloudNotify.getInstance().getHelper().notify(addressedPluginMessage.getMessage());
}

}
2 changes: 1 addition & 1 deletion src/main/resources/bungeecord/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Prefix: '&8[&bCloudNotify&8]&7'
Prefix: '&8[&bCloudNotify&8]&7 '
MySQL:
useSSL: true
user: YourUser
Expand Down

0 comments on commit df991f1

Please sign in to comment.