-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from RappyPlugins/feat/sentryFix
Fix sentry dsn and move method into ILabyUtilsPlugin
- Loading branch information
Showing
4 changed files
with
12 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ public void onEnable() { | |
configManager = new BukkitConfigManager(this); | ||
if(configManager.isSentryEnabled()) { | ||
getLogger().info("Thanks for enabling Sentry! Loading..."); | ||
initializeSentry(); | ||
initializeSentry(getDescription().getVersion()); | ||
} | ||
try { | ||
LabyModProtocolService.initialize(this); | ||
|
@@ -85,15 +85,6 @@ public BukkitConfigManager getConfigManager() { | |
return configManager; | ||
} | ||
|
||
private void initializeSentry() { | ||
Sentry.init(options -> { | ||
options.setDsn("https://[email protected]/3"); | ||
options.setTracesSampleRate(1.0); | ||
options.setRelease(getDescription().getVersion()); | ||
getLogger().info("Sentry loaded!"); | ||
}); | ||
} | ||
|
||
private boolean loadVaultEconomy() { | ||
if(getServer().getPluginManager().getPlugin("Vault") == null) return false; | ||
RegisteredServiceProvider<Economy> provider = getServer().getServicesManager().getRegistration(Economy.class); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
import com.rappytv.labyutils.bungee.commands.ReloadCommand; | ||
import com.rappytv.labyutils.bungee.listener.PlayerListener; | ||
import com.rappytv.labyutils.common.ILabyUtilsPlugin; | ||
import io.sentry.Sentry; | ||
import net.labymod.serverapi.server.bungeecord.LabyModProtocolService; | ||
import net.md_5.bungee.api.plugin.Plugin; | ||
|
||
|
@@ -25,7 +24,7 @@ public void onEnable() { | |
} | ||
if(configManager.isSentryEnabled()) { | ||
getLogger().info("Thanks for enabling Sentry! Loading..."); | ||
initializeSentry(); | ||
initializeSentry(getDescription().getVersion()); | ||
} | ||
getProxy().getPluginManager().registerCommand(this, new LabyInfoCommand(this)); | ||
getProxy().getPluginManager().registerCommand(this, new ReloadCommand(this)); | ||
|
@@ -39,13 +38,4 @@ public static String getPrefix() { | |
public BungeeConfigManager getConfigManager() { | ||
return configManager; | ||
} | ||
|
||
private void initializeSentry() { | ||
Sentry.init(options -> { | ||
options.setDsn("https://[email protected]/3"); | ||
options.setTracesSampleRate(1.0); | ||
options.setRelease(getDescription().getVersion()); | ||
getLogger().info("Sentry loaded!"); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,15 @@ public interface ILabyUtilsPlugin { | |
HttpClient client = HttpClient.newHttpClient(); | ||
Logger getLogger(); | ||
|
||
default void initializeSentry(String version) { | ||
Sentry.init(options -> { | ||
options.setDsn("https://[email protected]/4"); | ||
options.setTracesSampleRate(1.0); | ||
options.setRelease(version); | ||
getLogger().info("Sentry loaded!"); | ||
}); | ||
} | ||
|
||
default String formatNumber(double number) { | ||
DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); | ||
DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); | ||
|