From a3cc5ecd63d5254403484dc1e5e037a753195e12 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Fri, 17 Apr 2020 23:21:51 -0500 Subject: [PATCH 1/2] Remove sentry since it's unused --- connector/pom.xml | 6 - .../connector/metrics/SentryMetrics.java | 107 ------------------ 2 files changed, 113 deletions(-) delete mode 100644 connector/src/main/java/org/geysermc/connector/metrics/SentryMetrics.java diff --git a/connector/pom.xml b/connector/pom.xml index 76e895b2c..5830ce26f 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -30,12 +30,6 @@ 2.9.8 compile - - io.sentry - sentry - 1.7.0 - compile - com.nukkitx.protocol bedrock-v390 diff --git a/connector/src/main/java/org/geysermc/connector/metrics/SentryMetrics.java b/connector/src/main/java/org/geysermc/connector/metrics/SentryMetrics.java deleted file mode 100644 index 88926fd5e..000000000 --- a/connector/src/main/java/org/geysermc/connector/metrics/SentryMetrics.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.geysermc.connector.metrics; - -import io.sentry.Sentry; -import io.sentry.SentryClient; -import io.sentry.SentryClientFactory; -import io.sentry.context.Context; -import io.sentry.event.BreadcrumbBuilder; -import io.sentry.event.UserBuilder; - -public class SentryMetrics { - private static SentryClient sentry; - - public static void init() { - /* - It is recommended that you use the DSN detection system, which - will check the environment variable "SENTRY_DSN", the Java - System Property "sentry.dsn", or the "sentry.properties" file - in your classpath. This makes it easier to provide and adjust - your DSN without needing to change your code. See the configuration - page for more information. - */ - Sentry.init(); - - // You can also manually provide the DSN to the ``init`` method. - Sentry.init(); - - /* - It is possible to go around the static ``Sentry`` API, which means - you are responsible for making the SentryClient instance available - to your code. - */ - sentry = SentryClientFactory.sentryClient(); - - SentryMetrics metrics = new SentryMetrics(); - metrics.logWithStaticAPI(); - metrics.logWithInstanceAPI(); - } - - /** - * An example method that throws an exception. - */ - void unsafeMethod() { - throw new UnsupportedOperationException("You shouldn't call this!"); - } - - /** - * Examples using the (recommended) static API. - */ - void logWithStaticAPI() { - // Note that all fields set on the context are optional. Context data is copied onto - // all future events in the current context (until the context is cleared). - - // Record a breadcrumb in the current context. By default the last 100 breadcrumbs are kept. - Sentry.getContext().recordBreadcrumb( - new BreadcrumbBuilder().setMessage("User made an action").build() - ); - - // Set the user in the current context. - Sentry.getContext().setUser( - new UserBuilder().setEmail("hello@sentry.io").build() - ); - - // Add extra data to future events in this context. - Sentry.getContext().addExtra("extra", "thing"); - - // Add an additional tag to future events in this context. - Sentry.getContext().addTag("tagName", "tagValue"); - - /* - This sends a simple event to Sentry using the statically stored instance - that was created in the ``main`` method. - */ - Sentry.capture("This is a test"); - - try { - unsafeMethod(); - } catch (Exception e) { - // This sends an exception event to Sentry using the statically stored instance - // that was created in the ``main`` method. - Sentry.capture(e); - } - } - - /** - * Examples that use the SentryClient instance directly. - */ - void logWithInstanceAPI() { - // Retrieve the current context. - Context context = sentry.getContext(); - - // Record a breadcrumb in the current context. By default the last 100 breadcrumbs are kept. - context.recordBreadcrumb(new BreadcrumbBuilder().setMessage("User made an action").build()); - - // Set the user in the current context. - context.setUser(new UserBuilder().setEmail("geyser.project@gmail.com").build()); - - // This sends a simple event to Sentry. - sentry.sendMessage("This is a test"); - - try { - unsafeMethod(); - } catch (Exception e) { - // This sends an exception event to Sentry. - sentry.sendException(e); - } - } -} From 672024c718573ea347bbe20973d1ca77c0e96a04 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Fri, 17 Apr 2020 23:22:37 -0500 Subject: [PATCH 2/2] Update supported bedrock version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a0197972..056a83cac 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Geyser is a bridge between Minecraft: Bedrock Edition and Minecraft: Java Editio Geyser is a proxy, bridging the gap between Minecraft: Bedrock Edition and Minecraft: Java Edition servers. The ultimate goal of this project is to allow Minecraft: Bedrock Edition users to join Minecraft: Java Edition servers as seamlessly as possible. **Please note, this project is still a work in progress and should not be used on production. Expect bugs!** -### Currently supporting Minecraft Bedrock v1.14.X and Minecraft Java v1.15.2. +### Currently supporting Minecraft Bedrock v1.14.6(0) and Minecraft Java v1.15.2. ## Setting Up Take a look [here](https://github.com/GeyserMC/Geyser/wiki#Setup) for how to set up Geyser.