1
0

Arcade fix! Now its possible to run the server

This commit is contained in:
labalityowo
2023-05-20 13:13:21 +07:00
parent b4f55262b4
commit 91e871ea5f
11 changed files with 162 additions and 188 deletions

View File

@ -20,7 +20,7 @@ import com.mojang.util.UUIDTypeAdapter;
public class Constants
{
public static final String WEB_ADDRESS = "http://accounts.mineplex.com/";
public static final String WEB_ADDRESS = "http://127.0.0.1:1000/";
public static final String WEB_CONFIG_KEY = "webServer";
public static Gson GSON;

View File

@ -153,7 +153,7 @@ public class UtilServer
public static boolean isTestServer()
{
return isTestServer(true);
return isTestServer(false);
}
public static boolean isTestServer(boolean bypass)

View File

@ -217,6 +217,8 @@ public class TwoFactorAuth extends MiniClientPlugin<TwoFactorData>
TwoFactorData data = Get(player);
/*
if (data.getLastLoginIp().isPresent() && player.getAddress().getAddress().toString().substring(1).equals(data.getLastLoginIp().get()))
{
player.sendMessage(F.main("2FA", "Authenticated"));
@ -237,17 +239,20 @@ public class TwoFactorAuth extends MiniClientPlugin<TwoFactorData>
runSync(() -> setup2FA(event.getPlayer()));
}
}
*/
}
@EventHandler
public void onQuit(PlayerQuitEvent event)
{
/*
Player player = event.getPlayer();
if (setupData.remove(player.getUniqueId()) != null)
{
player.setItemInHand(null);
}
authenticating.remove(player.getUniqueId());
*/
}
@EventHandler(priority = EventPriority.LOWEST)

View File

@ -1,5 +1,6 @@
package mineplex.minecraft.game.classcombat.Skill.repository;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.reflect.TypeToken;
@ -17,6 +18,7 @@ public class SkillRepository extends MinecraftRepository
public List<SkillToken> GetSkills(List<SkillToken> skills)
{
return handleSyncMSSQLCall("Dominate/GetSkills", skills, new TypeToken<List<SkillToken>>(){}.getType());
//return handleSyncMSSQLCall("Dominate/GetSkills", skills, new TypeToken<List<SkillToken>>(){}.getType());
return new ArrayList<SkillToken>();
}
}

View File

@ -92,7 +92,7 @@ public class ServerGroup
_tournament = Boolean.valueOf(data.get("tournament"));
_tournamentPoints = Boolean.valueOf(data.get("tournamentPoints"));
_hardMaxPlayerCap = Boolean.valueOf(data.get("hardMaxPlayerCap"));
_games = data.get("games");
_games = data.getOrDefault("games", "Smash");
_modes = data.get("modes");
_boosterGroup = data.get("boosterGroup");
_serverType = data.getOrDefault("serverType", "dedicated");

View File

@ -71,7 +71,7 @@ import mineplex.core.stats.StatsManager;
import mineplex.core.status.ServerStatusManager;
import mineplex.core.teleport.Teleport;
import mineplex.core.thank.ThankManager;
//import mineplex.core.twofactor.TwoFactorAuth;
import mineplex.core.twofactor.TwoFactorAuth;
import mineplex.core.updater.FileUpdater;
import mineplex.core.updater.Updater;
import mineplex.core.velocity.VelocityFix;
@ -207,7 +207,7 @@ public class Arcade extends JavaPlugin
new FoodDupeFix(this);
//two factor is mad annoying`
//require(TwoFactorAuth.class);
require(TwoFactorAuth.class);
require(WebsiteLinkManager.class);
//require(TwitchIntegrationFix.class);

View File

@ -1377,7 +1377,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{
TimingManager.start("ArcadeManager LoadFiles");
File folder = new File(".." + File.separatorChar + ".." + File.separatorChar + "update" + File.separatorChar
File folder = new File("update" + File.separatorChar
+ "maps" + File.separatorChar + gameName);
System.out.println(folder.getAbsolutePath() + " -=-=-=-=-=");
if (!folder.exists())

View File

@ -494,6 +494,7 @@ public abstract class Game extends ListenerComponent implements Lifetimed
caller.sendMessage(F.main("Kit", "Sorry, but that is not a kit!"));
});
registerDebugCommand("cooldown", Perm.DEBUG_COMMANDS, PermissionGroup.ADMIN, (caller, args) ->
{
for (Player other : UtilServer.getPlayers())

View File

@ -380,6 +380,12 @@ public class GameCreationManager implements Listener
_maps.put(type, Manager.LoadFiles(type.getName()));
}
if(MapPref == null){
if(_maps.get(gameType) != null){
MapPref = _maps.get(gameType).get(0);
}
}
if (MapPref != null)
{
MapPref = MapPref.replace(" ", "");
@ -425,7 +431,7 @@ public class GameCreationManager implements Listener
}
else
{
System.out.println("Map Preference: None");
System.out.println("Map Preference: None ");
}
}