Package zombie.network
Class GameServer
java.lang.Object
zombie.network.GameServer
public class GameServer
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static booleanbCoopstatic booleanbDebugstatic booleanbFastForwardstatic booleanbServerstatic java.lang.Stringchecksumstatic java.util.HashSetDebugPlayerstatic intDEFAULT_PORTstatic DiscordBotdiscordBotstatic intFPSstatic java.lang.StringGameMapstatic booleanGUICommandlinestatic java.util.HashMapIDToAddressMapstatic java.util.HashMapIDToPlayerMapstatic java.lang.Stringipstatic java.lang.StringIPCommandlinestatic intMAX_PLAYERSstatic intMaxTicksSinceKeepAliveBeforeStallstatic intPacketsUpdateRatestatic java.util.ArrayListPlayersstatic intPortCommandlinestatic UdpConnectionremoveZombiesConnectionstatic intResetIDstatic java.util.ArrayListServerModsstatic java.lang.StringServerNamestatic intSteamPortCommandline1static intSteamPortCommandline2static java.lang.BooleanSteamVACCommandlinestatic intteststatic intTimeLimitForProcessPacketsstatic floattimeSinceKeepAlivestatic java.util.HashMaptransactionIDMapstatic UdpEngineudpEnginestatic booleanUseTCPForMapDownloadsstatic java.lang.String[]WorkshopInstallFoldersstatic java.util.ArrayListWorkshopItemsstatic long[]WorkshopTimeStampsstatic ObjectsSyncRequestsworldObjectsServerSyncReq -
Constructor Summary
Constructors Constructor Description GameServer() -
Method Summary
Modifier and Type Method Description static voidaddConnection(UdpConnection udpConnection)static voidaddDisconnect(UdpConnection udpConnection)static voidAddExplosiveTrap(HandWeapon handWeapon, IsoGridSquare square, boolean boolean1)static voidaddIncoming(short short1, java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection)static voidaddXp(IsoPlayer player, PerkFactory.Perk perk, int int1)static voiddisconnect(UdpConnection udpConnection)static voiddisconnectPlayer(IsoPlayer player, UdpConnection udpConnection)static voiddoMinimumInit()static booleandoSendZombies()static voiddoZomboidDataInMainLoop(ZomboidNetData zomboidNetData)static IsoPlayergetAnyPlayerFromConnection(UdpConnection udpConnection)static UdpConnectiongetConnectionByPlayerOnlineID(short short1)static UdpConnectiongetConnectionFromPlayer(IsoPlayer player)java.lang.StringgetDifficulty()static shortgetFreeSlot()static IsoPlayergetPlayerByRealUserName(java.lang.String string)static IsoPlayergetPlayerByUserName(java.lang.String string)static IsoPlayergetPlayerByUserNameForCommand(java.lang.String string)static intgetPlayerCount()static java.util.ArrayListgetPlayers()java.lang.StringgetPoisonousBerry()java.lang.StringgetPoisonousMushroom()static voidgetStatisticFromClients()static voidheartBeat()static voidinitClientCommandFilter()static booleanisServerDropPackets()static booleanisSpawnBuilding(BuildingDef buildingDef)static voidloadModData(IsoGridSquare square)static voidmain(java.lang.String[] stringArray)static voidPauseAllClients()static voidPlaySoundAtEveryPlayer(java.lang.String string)static voidPlaySoundAtEveryPlayer(java.lang.String string, int int1, int int2, int int3)static voidPlaySoundAtEveryPlayer(java.lang.String string, int int1, int int2, int int3, boolean boolean1)static voidPlayWorldSoundServer(java.lang.String string, boolean boolean1, IsoGridSquare square, float float1, float float2, float float3, boolean boolean2)static voidPlayWorldSoundWavServer(java.lang.String string, boolean boolean1, IsoGridSquare square, float float1, float float2, float float3, boolean boolean2)static java.lang.Stringrcon(java.lang.String string)static voidreceiveClientConnect(UdpConnection udpConnection, ServerWorldDatabase.LogonResult logonResult)static voidreceiveEatBody(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection, short short1)static voidreceivePlayerListensChannel(java.nio.ByteBuffer byteBuffer)static voidreceiveRadioDeviceDataState(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection)static voidreceiveThump(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection, short short1)static voidreceiveWaveSignal(java.nio.ByteBuffer byteBuffer)static intRemoveItemFromMap(IsoObject object)static voidsendAddItemToContainer(ItemContainer itemContainer, InventoryItem inventoryItem)static voidsendAdminMessage(java.lang.String string, int int1, int int2, int int3)static voidsendAlarm(int int1, int int2)static voidsendAmbient(java.lang.String string, int int1, int int2, int int3, float float1)static voidsendBloodSplatter(HandWeapon handWeapon, float float1, float float2, float float3, Vector2 vector2, boolean boolean1, boolean boolean2)static voidsendCompost(IsoCompost compost, UdpConnection udpConnection)static voidsendCorpse(IsoDeadBody deadBody)static voidsendFuranceChange(BSFurnace bSFurnace, UdpConnection udpConnection)static voidsendHelicopter(float float1, float float2, boolean boolean1)static voidsendIsoWaveSignal(int int1, int int2, int int3, java.lang.String string, java.lang.String string2, float float1, float float2, float float3, int int4, boolean boolean1)static booleansendItemListNet(UdpConnection udpConnection, IsoPlayer player, java.util.ArrayList arrayList, IsoPlayer player2, java.lang.String string, java.lang.String string2)static voidsendItemsInContainer(IsoObject object, ItemContainer itemContainer)static voidsendKillZombie(IsoZombie zombie)static voidsendMetaGrid(int int1, int int2, int int3)static voidsendMetaGrid(int int1, int int2, int int3, UdpConnection udpConnection)static voidsendNonPvpZone(NonPvpZone nonPvpZone, boolean boolean1, UdpConnection udpConnection)static voidsendObjectChange(IsoObject object, java.lang.String string, java.lang.Object[] objectArray)static voidsendObjectChange(IsoObject object, java.lang.String string, KahluaTable kahluaTable)static voidsendObjectModData(IsoObject object)static voidsendOptionsToClients()static voidsendPlayerDamage(IsoPlayer player, UdpConnection udpConnection)static voidsendPlayerDamagedByCarCrash(IsoPlayer player, float float1)static voidsendPlayerDeath(DeadPlayerPacket deadPlayerPacket, UdpConnection udpConnection)static voidsendPlayerExtraInfo(IsoPlayer player, UdpConnection udpConnection)static voidsendReanimatedZombieID(IsoPlayer player, IsoZombie zombie)static voidsendRemoveCorpseFromMap(IsoDeadBody deadBody)static voidsendRemoveItemFromContainer(ItemContainer itemContainer, InventoryItem inventoryItem)static voidsendSafehouse(SafeHouse safeHouse, boolean boolean1, UdpConnection udpConnection)static voidsendServerCommand(java.lang.String string, java.lang.String string2, KahluaTable kahluaTable)static voidsendServerCommand(java.lang.String string, java.lang.String string2, KahluaTable kahluaTable, UdpConnection udpConnection)static voidsendServerCommand(IsoPlayer player, java.lang.String string, java.lang.String string2, KahluaTable kahluaTable)static voidsendServerCommandV(java.lang.String string, java.lang.String string2, java.lang.Object[] objectArray)static voidsendShortStatistic()static voidsendShortStatistic(UdpConnection udpConnection)static voidsendSlowFactor(IsoGameCharacter gameCharacter)static voidsendStatistic()static voidsendStatistic(UdpConnection udpConnection)static voidsendWeather()static voidsendWorldSound(UdpConnection udpConnection, WorldSoundManager.WorldSound worldSound)static voidsendWorldSound(WorldSoundManager.WorldSound worldSound, UdpConnection udpConnection)static voidsendZombie(IsoZombie zombie)static voidsendZombieDeath(IsoZombie zombie)static voidsendZombieSound(IsoZombie.ZombieSound zombieSound, IsoZombie zombie)static voidsendZone(IsoMetaGrid.Zone zone, UdpConnection udpConnection)voidsetDifficulty(java.lang.String string)voidsetPoisonousBerry(java.lang.String string)voidsetPoisonousMushroom(java.lang.String string)static voidsetupCoop()static voidsmashWindow(IsoWindow window, int int1)static voidstartFireOnClient(IsoGridSquare square, int int1, boolean boolean1, int int2, boolean boolean2)static voidstartRain()static voidstartServer()static voidstopRain()static voidsyncClock()static voidSyncCustomLightSwitchSettings(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection)static voidSyncObjectChunkHashes(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection)static voidSyncObjectChunkHashes(IsoChunk chunk, UdpConnection udpConnection)static voidSyncObjectsGridSquareRequest(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection)static voidSyncObjectsRequest(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection)static voidtransmitBrokenGlass(IsoGridSquare square)static voidUnPauseAllClients()static voidupdateOverlayForClients(IsoObject object, java.lang.String string, float float1, float float2, float float3, float float4, UdpConnection udpConnection)static voidupdateZombieControl(IsoZombie zombie, short short1, int int1)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAX_PLAYERS
public static final int MAX_PLAYERS- See Also:
- Constant Field Values
-
TimeLimitForProcessPackets
public static final int TimeLimitForProcessPackets- See Also:
- Constant Field Values
-
PacketsUpdateRate
public static final int PacketsUpdateRate- See Also:
- Constant Field Values
-
FPS
public static final int FPS- See Also:
- Constant Field Values
-
test
public static int test -
DEFAULT_PORT
public static int DEFAULT_PORT -
IPCommandline
public static java.lang.String IPCommandline -
PortCommandline
public static int PortCommandline -
SteamPortCommandline1
public static int SteamPortCommandline1 -
SteamPortCommandline2
public static int SteamPortCommandline2 -
SteamVACCommandline
public static java.lang.Boolean SteamVACCommandline -
GUICommandline
public static boolean GUICommandline -
bServer
public static boolean bServer -
bCoop
public static boolean bCoop -
bDebug
public static boolean bDebug -
udpEngine
-
IDToAddressMap
public static final java.util.HashMap IDToAddressMap -
IDToPlayerMap
public static final java.util.HashMap IDToPlayerMap -
Players
public static final java.util.ArrayList Players -
timeSinceKeepAlive
public static float timeSinceKeepAlive -
MaxTicksSinceKeepAliveBeforeStall
public static int MaxTicksSinceKeepAliveBeforeStall -
DebugPlayer
public static final java.util.HashSet DebugPlayer -
ResetID
public static int ResetID -
ServerMods
public static final java.util.ArrayList ServerMods -
WorkshopItems
public static final java.util.ArrayList WorkshopItems -
WorkshopInstallFolders
public static java.lang.String[] WorkshopInstallFolders -
WorkshopTimeStamps
public static long[] WorkshopTimeStamps -
ServerName
public static java.lang.String ServerName -
discordBot
-
checksum
public static java.lang.String checksum -
GameMap
public static java.lang.String GameMap -
bFastForward
public static boolean bFastForward -
UseTCPForMapDownloads
public static boolean UseTCPForMapDownloads -
transactionIDMap
public static final java.util.HashMap transactionIDMap -
worldObjectsServerSyncReq
-
ip
public static java.lang.String ip -
removeZombiesConnection
-
-
Constructor Details
-
GameServer
public GameServer()
-
-
Method Details
-
PauseAllClients
public static void PauseAllClients() -
UnPauseAllClients
public static void UnPauseAllClients() -
setupCoop
public static void setupCoop() throws java.io.FileNotFoundException- Throws:
java.io.FileNotFoundException
-
main
public static void main(java.lang.String[] stringArray) -
rcon
public static java.lang.String rcon(java.lang.String string) -
sendPlayerExtraInfo
-
doMinimumInit
public static void doMinimumInit() throws java.io.IOException- Throws:
java.io.IOException
-
startServer
public static void startServer() throws java.net.ConnectException- Throws:
java.net.ConnectException
-
sendShortStatistic
public static void sendShortStatistic() -
sendShortStatistic
-
sendStatistic
public static void sendStatistic() -
sendStatistic
-
getStatisticFromClients
public static void getStatisticFromClients() -
updateZombieControl
-
sendNonPvpZone
public static void sendNonPvpZone(NonPvpZone nonPvpZone, boolean boolean1, UdpConnection udpConnection) -
sendCompost
-
AddExplosiveTrap
-
sendHelicopter
public static void sendHelicopter(float float1, float float2, boolean boolean1) -
sendZone
-
addXp
-
startFireOnClient
public static void startFireOnClient(IsoGridSquare square, int int1, boolean boolean1, int int2, boolean boolean2) -
sendOptionsToClients
public static void sendOptionsToClients() -
sendCorpse
-
loadModData
-
doZomboidDataInMainLoop
-
PlayWorldSoundServer
public static void PlayWorldSoundServer(java.lang.String string, boolean boolean1, IsoGridSquare square, float float1, float float2, float float3, boolean boolean2) -
PlayWorldSoundWavServer
public static void PlayWorldSoundWavServer(java.lang.String string, boolean boolean1, IsoGridSquare square, float float1, float float2, float float3, boolean boolean2) -
PlaySoundAtEveryPlayer
public static void PlaySoundAtEveryPlayer(java.lang.String string, int int1, int int2, int int3) -
PlaySoundAtEveryPlayer
public static void PlaySoundAtEveryPlayer(java.lang.String string) -
PlaySoundAtEveryPlayer
public static void PlaySoundAtEveryPlayer(java.lang.String string, int int1, int int2, int int3, boolean boolean1) -
sendZombieSound
-
initClientCommandFilter
public static void initClientCommandFilter() -
getAnyPlayerFromConnection
-
getPlayerByRealUserName
-
getPlayerByUserName
-
getPlayerByUserNameForCommand
-
getConnectionByPlayerOnlineID
-
getConnectionFromPlayer
-
sendAddItemToContainer
public static void sendAddItemToContainer(ItemContainer itemContainer, InventoryItem inventoryItem) -
sendRemoveItemFromContainer
public static void sendRemoveItemFromContainer(ItemContainer itemContainer, InventoryItem inventoryItem) -
sendItemsInContainer
-
addConnection
-
addDisconnect
-
disconnectPlayer
-
heartBeat
public static void heartBeat() -
getFreeSlot
public static short getFreeSlot() -
receiveClientConnect
public static void receiveClientConnect(UdpConnection udpConnection, ServerWorldDatabase.LogonResult logonResult) -
sendMetaGrid
-
sendMetaGrid
public static void sendMetaGrid(int int1, int int2, int int3) -
sendObjectModData
-
sendSlowFactor
-
sendObjectChange
public static void sendObjectChange(IsoObject object, java.lang.String string, KahluaTable kahluaTable) -
sendObjectChange
public static void sendObjectChange(IsoObject object, java.lang.String string, java.lang.Object[] objectArray) -
sendZombie
-
SyncCustomLightSwitchSettings
public static void SyncCustomLightSwitchSettings(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection) -
SyncObjectChunkHashes
public static void SyncObjectChunkHashes(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection) -
SyncObjectChunkHashes
-
SyncObjectsGridSquareRequest
public static void SyncObjectsGridSquareRequest(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection) -
SyncObjectsRequest
-
RemoveItemFromMap
-
sendBloodSplatter
public static void sendBloodSplatter(HandWeapon handWeapon, float float1, float float2, float float3, Vector2 vector2, boolean boolean1, boolean boolean2) -
disconnect
-
addIncoming
public static void addIncoming(short short1, java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection) -
smashWindow
-
doSendZombies
public static boolean doSendZombies() -
sendZombieDeath
-
sendPlayerDeath
-
sendPlayerDamage
-
sendRemoveCorpseFromMap
-
sendKillZombie
-
receiveEatBody
public static void receiveEatBody(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection, short short1) -
receiveThump
public static void receiveThump(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection, short short1) -
sendWorldSound
public static void sendWorldSound(UdpConnection udpConnection, WorldSoundManager.WorldSound worldSound) -
sendWorldSound
public static void sendWorldSound(WorldSoundManager.WorldSound worldSound, UdpConnection udpConnection) -
startRain
public static void startRain() -
stopRain
public static void stopRain() -
sendWeather
public static void sendWeather() -
syncClock
public static void syncClock() -
sendServerCommand
public static void sendServerCommand(java.lang.String string, java.lang.String string2, KahluaTable kahluaTable, UdpConnection udpConnection) -
sendServerCommand
public static void sendServerCommand(java.lang.String string, java.lang.String string2, KahluaTable kahluaTable) -
sendServerCommandV
public static void sendServerCommandV(java.lang.String string, java.lang.String string2, java.lang.Object[] objectArray) -
sendServerCommand
public static void sendServerCommand(IsoPlayer player, java.lang.String string, java.lang.String string2, KahluaTable kahluaTable) -
getPlayers
public static java.util.ArrayList getPlayers() -
getPlayerCount
public static int getPlayerCount() -
sendAmbient
public static void sendAmbient(java.lang.String string, int int1, int int2, int int3, float float1) -
updateOverlayForClients
public static void updateOverlayForClients(IsoObject object, java.lang.String string, float float1, float float2, float float3, float float4, UdpConnection udpConnection) -
sendReanimatedZombieID
-
sendSafehouse
public static void sendSafehouse(SafeHouse safeHouse, boolean boolean1, UdpConnection udpConnection) -
receiveRadioDeviceDataState
public static void receiveRadioDeviceDataState(java.nio.ByteBuffer byteBuffer, UdpConnection udpConnection) -
sendIsoWaveSignal
public static void sendIsoWaveSignal(int int1, int int2, int int3, java.lang.String string, java.lang.String string2, float float1, float float2, float float3, int int4, boolean boolean1) -
receiveWaveSignal
public static void receiveWaveSignal(java.nio.ByteBuffer byteBuffer) -
receivePlayerListensChannel
public static void receivePlayerListensChannel(java.nio.ByteBuffer byteBuffer) -
sendAlarm
public static void sendAlarm(int int1, int int2) -
isSpawnBuilding
-
sendFuranceChange
-
sendAdminMessage
public static void sendAdminMessage(java.lang.String string, int int1, int int2, int int3) -
sendItemListNet
public static boolean sendItemListNet(UdpConnection udpConnection, IsoPlayer player, java.util.ArrayList arrayList, IsoPlayer player2, java.lang.String string, java.lang.String string2) -
sendPlayerDamagedByCarCrash
-
getPoisonousBerry
public java.lang.String getPoisonousBerry() -
setPoisonousBerry
public void setPoisonousBerry(java.lang.String string) -
getPoisonousMushroom
public java.lang.String getPoisonousMushroom() -
setPoisonousMushroom
public void setPoisonousMushroom(java.lang.String string) -
getDifficulty
public java.lang.String getDifficulty() -
setDifficulty
public void setDifficulty(java.lang.String string) -
transmitBrokenGlass
-
isServerDropPackets
public static boolean isServerDropPackets()
-