Fixes name apply w/ pom changes

This commit is contained in:
Sotr
2018-05-25 22:50:53 +08:00
parent 55d0416c5d
commit a8acd29e76
5 changed files with 11 additions and 11 deletions

View File

@@ -1,12 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.destroystokyo.paper</groupId> <artifactId>akarin</artifactId>
<artifactId>paper</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.12.2-R0.1-SNAPSHOT</version> <version>1.12.2-R0.1-SNAPSHOT</version>
<name>Paper</name> <name>Akarin</name>
<url>https://github.com/PaperMC/Paper</url> <url>https://github.com/Akarin-project/Akarin</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@@ -2,12 +2,13 @@ package io.akarin.server.mixin.core;
import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftServer;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable; import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(value = CraftServer.class, remap = false) @Mixin(value = CraftServer.class, remap = false)
public class MixinCraftServer { public class MixinCraftServer {
@Shadow @Mutable @Final private final String serverName = "Akarin"; // Paper -> Akarin @Overwrite
public String getName() {
return "Akarin";
}
} }

View File

@@ -17,7 +17,7 @@ import com.destroystokyo.paper.Metrics.CustomChart;
@Mixin(value = Metrics.class, remap = false) @Mixin(value = Metrics.class, remap = false)
public class MixinMetrics { public class MixinMetrics {
// The url to which the data is sent - bukkit/Torch (keep our old name) // The url to which the data is sent - bukkit/Torch (keep our old name)
@Shadow @Mutable @Final public static String URL = "https://bStats.org/submitData/bukkit"; @Shadow @Mutable @Final public final static String URL = "https://bStats.org/submitData/bukkit";
// The name of the server software // The name of the server software
@Shadow @Final private String name; @Shadow @Final private String name;
@@ -57,7 +57,6 @@ public class MixinMetrics {
int onlineMode = Bukkit.getOnlineMode() ? 1 : 0; int onlineMode = Bukkit.getOnlineMode() ? 1 : 0;
String bukkitVersion = org.bukkit.Bukkit.getVersion(); String bukkitVersion = org.bukkit.Bukkit.getVersion();
bukkitVersion = bukkitVersion.substring(bukkitVersion.indexOf("MC: ") + 4, bukkitVersion.length() - 1); bukkitVersion = bukkitVersion.substring(bukkitVersion.indexOf("MC: ") + 4, bukkitVersion.length() - 1);
LogWrapper.logger.warn("Akarin debug: " + URL);
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
data.put("playerAmount", playerAmount); data.put("playerAmount", playerAmount);

View File

@@ -11,6 +11,7 @@
"MixinMetrics", "MixinMetrics",
"MixinPaperConfig", "MixinPaperConfig",
"MixinCraftServer",
"MixinVersionCommand", "MixinVersionCommand",
"MixinMinecraftServer" "MixinMinecraftServer"
] ]