mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-05-22 19:05:04 +00:00
On the dedicated server, hardcore death now persists XUID and IP bans to banned-players.json and banned-ips.json via the Access system, and disconnects the player. Bans survive server restarts. Client-hosted games retain the existing in-memory XUID ban with force-save behavior. - Add hardcore property to server.properties (forces Hard difficulty) - Add LevelData::setHardcore() so loaded worlds respect the server config - Add PlayerList::banPlayerForHardcoreDeath() with persistent XUID + IP bans - Reject respawn requests server-side in hardcore mode - Ensure server-side player ticks run without move packets (fixes environmental damage not applying for some clients) - Restore 0x8 hardcore bit on LoginPacket/RespawnPacket wire format so the client-side death screen detects hardcore mode correctly
67 lines
1.7 KiB
C++
67 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "LevelData.h"
|
|
|
|
class GameRules;
|
|
|
|
class DerivedLevelData : public LevelData
|
|
{
|
|
private:
|
|
LevelData *wrapped;
|
|
|
|
public:
|
|
DerivedLevelData(LevelData *wrapped);
|
|
|
|
protected:
|
|
virtual void setTagData(CompoundTag *tag); // 4J Added
|
|
|
|
public:
|
|
CompoundTag *createTag();
|
|
CompoundTag *createTag(vector<shared_ptr<Player> > *players);
|
|
int64_t getSeed();
|
|
int getXSpawn();
|
|
int getYSpawn();
|
|
int getZSpawn();
|
|
int64_t getGameTime();
|
|
int64_t getDayTime();
|
|
int64_t getSizeOnDisk();
|
|
CompoundTag *getLoadedPlayerTag();
|
|
wstring getLevelName();
|
|
int getVersion();
|
|
int64_t getLastPlayed();
|
|
bool isThundering();
|
|
int getThunderTime();
|
|
bool isRaining();
|
|
int getRainTime();
|
|
GameType *getGameType();
|
|
void setSeed(int64_t seed);
|
|
void setXSpawn(int xSpawn);
|
|
void setYSpawn(int ySpawn);
|
|
void setZSpawn(int zSpawn);
|
|
void setGameTime(int64_t time);
|
|
void setDayTime(int64_t time);
|
|
void setSizeOnDisk(int64_t sizeOnDisk);
|
|
void setLoadedPlayerTag(CompoundTag *loadedPlayerTag);
|
|
void setDimension(int dimension);
|
|
void setSpawn(int xSpawn, int ySpawn, int zSpawn);
|
|
void setLevelName(const wstring &levelName);
|
|
void setVersion(int version);
|
|
void setThundering(bool thundering);
|
|
void setThunderTime(int thunderTime);
|
|
void setRaining(bool raining);
|
|
void setRainTime(int rainTime);
|
|
bool isGenerateMapFeatures();
|
|
void setGameType(GameType *gameType);
|
|
bool isHardcore();
|
|
void setHardcore(bool hardcore);
|
|
LevelType *getGenerator();
|
|
void setGenerator(LevelType *generator);
|
|
bool getAllowCommands();
|
|
void setAllowCommands(bool allowCommands);
|
|
bool isInitialized();
|
|
void setInitialized(bool initialized);
|
|
GameRules *getGameRules();
|
|
int getXZSize(); // 4J Added
|
|
int getHellScale(); // 4J Addded
|
|
};
|