mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
43702a9e10
By: md_5 <git@md-5.net>
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
--- a/net/minecraft/stats/ServerStatisticManager.java
|
|
+++ b/net/minecraft/stats/ServerStatisticManager.java
|
|
@@ -1,3 +1,4 @@
|
|
+// mc-dev import
|
|
package net.minecraft.stats;
|
|
|
|
import com.google.common.collect.Maps;
|
|
@@ -161,13 +162,12 @@
|
|
}
|
|
|
|
private <T> Optional<Statistic<T>> getStat(StatisticWrapper<T> statisticwrapper, String s) {
|
|
- Optional optional = Optional.ofNullable(MinecraftKey.tryParse(s));
|
|
- IRegistry iregistry = statisticwrapper.getRegistry();
|
|
+ // CraftBukkit - decompile error start
|
|
+ Optional<MinecraftKey> optional = Optional.ofNullable(MinecraftKey.tryParse(s));
|
|
+ IRegistry<T> iregistry = statisticwrapper.getRegistry();
|
|
|
|
- Objects.requireNonNull(iregistry);
|
|
- optional = optional.flatMap(iregistry::getOptional);
|
|
- Objects.requireNonNull(statisticwrapper);
|
|
- return optional.map(statisticwrapper::get);
|
|
+ return optional.flatMap(iregistry::getOptional).map(statisticwrapper::get);
|
|
+ // CraftBukkit - decompile error end
|
|
}
|
|
|
|
private static NBTTagCompound fromJson(JsonObject jsonobject) {
|