Skip to content

Commit

Permalink
Merge branch 'dev/0.3.x'
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle.kts
  • Loading branch information
Cubxity committed Dec 4, 2021
2 parents ae53d40 + 9a90bbb commit 5c90a71
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 20 deletions.
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Bug Report
description: Is something now working as it should?
labels: [bug]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this bug?
description: Please [search here](https://github.com/Cubxity/UnifiedMetrics/issues?q=is%3Aissue) to see if someone else has already reported this.
options:
- label: I have searched the existing issues before opening this bug report.
required: true

- type: textarea
attributes:
label: Current Behavior
description: "Explain in detail what is the error or issue you are facing when using UnifiedMetrics in your server"
validations:
required: true

- type: textarea
attributes:
label: Expected Behavior
description: "Explain how it should work or respond"
validations:
required: true

- type: dropdown
attributes:
label: Server type
description: "What type of server software are you using?"
multiple: false
options:
- Spigot (includes Spigot-based forks)
- Fabric
- Minestom
- Velocity
- Bungeecord / Waterfall
validations:
required: true

- type: textarea
attributes:
label: Server Version
description: "What is the server version being used? Eg 1.18, 1.17.1"
validations:
required: true

- type: textarea
attributes:
label: Other Mods / Plugins in your server
description: "Provide a list of other Plugins / Mods than UnifiedMetrics which was in your server when this issue happened. (If none, enter N/A)"
validations:
required: true

- type: textarea
attributes:
label: Error log
description: "Paste the error log from your console to paste sites like https://paste.gg/ or http://hastebin.com/ (Do include complete log for better error checking and do hide sensitive informations)"
validations:
required: false

- type: textarea
attributes:
label: More information
description: "Feel free to add in more details like screenshot, spark reports, etc"
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Installation Help
url: https://discord.gg/kDDhqJmPpA
about: Please visit our Discord for help with your installation.
- name: General Question
url: https://discord.gg/kDDhqJmPpA
about: Please visit our Discord for general questions about Unifiedmetrics.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Enhancement
description: Suggest a new feature or enhancement to the software.
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Is there an existing feature request for this?
description: Please [search here](https://github.com/Cubxity/UnifiedMetrics/issues?q=is%3Aissue) to see if someone else has already suggested this.
options:
- label: I have searched the existing issues before opening this feature request.
required: true

- type: textarea
attributes:
label: Describe the feature you would like to see.
description: "Explain in detail what is the feature/enhancement you would like to add and what issue it could solve."
validations:
required: true

- type: textarea
attributes:
label: How would you like to see this implemented?
description: "Provide an explanation on how the feature should be implemented into UnifiedMetrics and how it would work with your server"
validations:
required: true

- type: textarea
attributes:
label: Additional information to this request.
description: "You can provide more information like references and screenshots related to the feature request."
validations:
required: false
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![UnifiedMetrics](.github/assets/banner.png)

[![License](https://img.shields.io/github/license/Cubxity/UnifiedMetrics?style=flat-square)](COPYING.LESSER)
[![Issues](https://img.shields.io/github/issues/Cubxity/UnifiedMetrics?style=flat-square)](https://github.com/Cubxity/UnifiedMetrics/issues)
[![Workflow Status](https://img.shields.io/github/workflow/status/Cubxity/UnifiedMetrics/gradle-preview-ci/master?style=flat-square)](https://github.com/Cubxity/UnifiedMetrics/actions)
[![Maven Central](https://img.shields.io/maven-central/v/dev.cubxity.plugins/unifiedmetrics-api?color=green&style=flat-square)](https://search.maven.org/search?q=g:dev.cubxity.plugins%20a:unifiedmetrics-api)
[![Discord](https://img.shields.io/badge/join-discord-blue?style=flat-square)](https://discord.gg/kDDhqJmPpA)

UnifiedMetrics is a fully-featured free and open-source metrics collection plugin for Minecraft servers. This project is
Expand Down Expand Up @@ -128,6 +128,9 @@ The output artifacts can be found in `subproject/build/libs`.

## API

[![Maven Central](https://img.shields.io/maven-central/v/dev.cubxity.plugins/unifiedmetrics-api?color=green&style=flat-square)](https://search.maven.org/search?q=g:dev.cubxity.plugins%20a:unifiedmetrics-api)
![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/dev.cubxity.plugins/unifiedmetrics-api?color=yellow&label=snapshots&server=https%3A%2F%2Fs01.oss.sonatype.org&style=flat-square)

<details>
<summary>Instructions (click to show)</summary>

Expand All @@ -140,14 +143,16 @@ Example plugins can be found under [examples](examples) directory.
```kotlin
repositories {
mavenCentral()

// Snapshots repository (only required for -SNAPSHOT versions)
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
```

```kotlin
dependencies {
// ...
compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.3-SNAPSHOT")
// Replace this with the desired version
compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.3")
}
```

Expand Down
4 changes: 4 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ publishing {
}
}
}

signing {
sign(publishing.publications["mavenJava"])
}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {
allprojects {
group = "dev.cubxity.plugins"
description = "Fully featured metrics collector agent for Minecraft servers."
version = "0.3.3"
version = "0.3.4"

repositories {
mavenCentral()
Expand Down
3 changes: 1 addition & 2 deletions examples/collector-zombies/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ version = "0.0.1-SNAPSHOT"
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}

dependencies {
compileOnly("com.destroystokyo.paper", "paper-api", "1.16.5-R0.1-SNAPSHOT")
compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.3-SNAPSHOT")
compileOnly("dev.cubxity.plugins", "unifiedmetrics-api", "0.3.3")
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@

import dev.cubxity.plugins.metrics.fabric.events.TickEvent;
import net.minecraft.server.MinecraftServer;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Slice;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import static dev.cubxity.plugins.metrics.api.metric.collector.CollectorKt.NANOSECONDS_PER_MILLISECOND;
Expand Down Expand Up @@ -59,19 +57,9 @@ private void onTickStart(CallbackInfo ci) {

@Inject(
method = "tick",
slice = @Slice(
from = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/snooper/Snooper;update()V"
),
to = @At(
value = "FIELD",
target = "Lnet/minecraft/server/MinecraftServer;lastTickLengths:[J"
)
),
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/profiler/Profiler;pop()V"
value = "CONSTANT",
args = "stringValue=tallying"
)
)
private void onTickEnd(CallbackInfo ci) {
Expand Down

0 comments on commit 5c90a71

Please sign in to comment.