Fix minor Gaea related issues

This commit is contained in:
dfsek
2020-12-10 10:52:02 -07:00
parent 95e39324c7
commit 3dc27f2b0a
3 changed files with 2 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ import java.io.Serializable;
public class SerializationUtil {
public static Object fromFile(File f) throws IOException, ClassNotFoundException {
ObjectInputStream ois = new MovedObjectInputStream(new FileInputStream(f), "com.dfsek.betterend.gaea", "com.dfsek.terra.api.gaea"); // Backwards compat with old BetterEnd shade location
ObjectInputStream ois = new MovedObjectInputStream(new FileInputStream(f), "org.polydev.gaea", "com.dfsek.terra.api.gaea"); // Backwards compat with old Gaea location
Object o = ois.readObject();
ois.close();
return o;

View File

@@ -2,14 +2,11 @@ package com.dfsek.terra.command;
import com.dfsek.terra.api.gaea.command.Command;
import com.dfsek.terra.config.lang.LangUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
public class VersionCommand extends Command {
public VersionCommand(Command parent) {
@@ -28,12 +25,8 @@ public class VersionCommand extends Command {
@Override
public boolean execute(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {
Plugin gaea = Objects.requireNonNull(Bukkit.getPluginManager().getPlugin("Gaea"));
String gaeaVersion = gaea.getDescription().getVersion();
String terraVersion = getMain().getDescription().getVersion();
LangUtil.send("command.version", sender, terraVersion, gaeaVersion);
LangUtil.send("command.version", sender, terraVersion);
return true;
}

View File

@@ -1,5 +1,4 @@
name: "Terra"
depend: [ "Gaea" ]
main: "com.dfsek.terra.Terra"
version: "@VERSION@"
load: "STARTUP"