Added Bedwars

Added ConfigurationHandler for games
Further progress
This commit is contained in:
2023-01-07 23:54:55 +01:00
parent bf4d8b97ed
commit d1432347c1
452 changed files with 671 additions and 44019 deletions

View File

@ -9,6 +9,8 @@ import net.minestom.server.MinecraftServer;
import net.minestom.server.entity.Player;
import net.minestom.server.event.EventListener;
import net.minestom.server.event.instance.AddEntityToInstanceEvent;
import net.minestom.server.potion.Potion;
import net.minestom.server.potion.PotionEffect;
import net.minestom.server.timer.ExecutionType;
import org.jetbrains.annotations.NotNull;
@ -26,7 +28,7 @@ public class AddEntityToInstanceEventListener implements EventListener<AddEntity
new ActionBarMessage().appendStatic(Component.text("Instance: ", NamedTextColor.DARK_GRAY)).appendStatic(event.getInstance().getUniqueId().toString()).send(p);
new ChatMessage(Icon.SCIENCE).appendStatic(Component.text(event.getInstance().getUniqueId().toString())).send(p);
//p.addEffect(new Potion(PotionEffect.BLINDNESS, (byte) 1, 20)); //TODO Uncomment, currently buggy causes disconnect see https://github.com/Minestom/Minestom/discussions/1302
p.addEffect(new Potion(PotionEffect.BLINDNESS, (byte) 1, 20)); //TODO Uncomment, currently buggy causes disconnect see https://github.com/Minestom/Minestom/discussions/1302
}
return Result.SUCCESS;

View File

@ -24,7 +24,7 @@ public class PlayerLoginHandler implements EventListener<PlayerLoginEvent> {
p.setRespawnPoint(Hub.INSTANCE.getSpawn());
p.sendMessage(p.getUuid().toString());
event.setSpawningInstance(Hub.INSTANCE);
SkinCache.applySkin(p);
//SkinCache.applySkin(p);
if(p.getUsername().equalsIgnoreCase("minetec"))