fix server

This commit is contained in:
MeexReay 2024-12-22 01:20:54 +03:00
parent 3a6df05fb7
commit 8e007763bf
5 changed files with 34 additions and 28 deletions

21
server/src/world.py Normal file
View file

@ -0,0 +1,21 @@
from player import Player
from block import Block
def getPlayers():
global WORLD
for b in WORLD:
if type(b) == Player:
yield b
def getPlayer(name):
global WORLD
for b in WORLD:
if type(b) == Player:
if b.name == name:
return b
WORLD = [
Block(-1, -1, "normal", "#555", True),
Block(0, -1, "spawn", "#2ad", True),
Block(1, -1, "normal", "#555", True)
]