use viaversion modcontainer version, update issue templates

closes #41
This commit is contained in:
creeper123123321 2020-08-04 07:53:59 -03:00
parent dccf63bb86
commit 771887c01a
3 changed files with 15 additions and 9 deletions

View File

@ -5,7 +5,11 @@ about: Create a bug report so we can fix it
--- ---
**Describe the bug, provide any errors** **Describe the bug, provide any errors**
A clear and concise description of what the bug is. Can you https://hastebin.com the error? A clear and concise description of what the bug is. Can you paste the error into https://gist.github.com?
**Is this happening specifically by ViaFabric?**
(Optional)
- [ ] It seems to not happen when using ViaVersion/ViaBackwards/ViaRewind installed on Bukkit/BungeeCord/Sponge/Velocity servers.
**How can we reproduce it?** **How can we reproduce it?**
Steps to reproduce the behavior: Steps to reproduce the behavior:
@ -23,4 +27,4 @@ If applicable, add screenshots to help explain your problem.
- Type /viaversion dump, and put the link here. - Type /viaversion dump, and put the link here.
**Additional server info** **Additional server info**
Do you use a proxy (eg. BungeeCord)? What software do you use and what plugins? Is server using a proxy (eg. BungeeCord/Waterfall/Travertine/Velocity)? What software is it using and what plugins? Are you running on client-side mode? (Debug hud (F3) has server brand)

View File

@ -1,12 +1,16 @@
--- ---
name: Feature request name: Feature request
about: Suggest an idea for ViaVersion about: Suggest an idea for ViaFabric
--- ---
**Is your feature request related to a problem? Please describe.** **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Is this related specifically to ViaFabric?**
(Optional)
- [ ] It seems to not apply for ViaVersion/ViaBackwards/ViaRewind installed on Bukkit/BungeeCord/Sponge/Velocity servers.
**Describe the solution you'd like** **Describe the solution you'd like**
A clear and concise description of what you want to happen. A clear and concise description of what you want to happen.

View File

@ -35,6 +35,8 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment; import net.fabricmc.api.Environment;
import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer; import net.fabricmc.loader.api.ModContainer;
import net.fabricmc.loader.api.Version;
import net.fabricmc.loader.api.metadata.ModMetadata;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
@ -113,12 +115,8 @@ public class VRPlatform implements ViaPlatform<UUID> {
@Override @Override
public String getPluginVersion() { public String getPluginVersion() {
try { return FabricLoader.getInstance().getModContainer("viaversion").map(ModContainer::getMetadata)
return VersionInfo.class.getField("VERSION").get(null).toString(); .map(ModMetadata::getVersion).map(Version::getFriendlyString).orElse("UNKNOWN");
} catch (IllegalAccessException | NoSuchFieldException e) {
e.printStackTrace();
}
return "?";
} }
@Override @Override