/*
 * This file is part of Sponge, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered <https://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.spongepowered.common.mixin.api.mcp.server.dedicated;

import net.minecraft.server.dedicated.DedicatedServer;
import org.spongepowered.api.Server;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.common.mixin.api.mcp.server.MinecraftServerMixin_API;

import java.net.InetSocketAddress;
import java.util.Optional;

@Mixin(DedicatedServer.class)
public abstract class DedicatedServerMixin_API extends MinecraftServerMixin_API implements Server {

    @Shadow public abstract String shadow$getHostname();
    @Shadow public abstract int shadow$getPort();

    @Override
    public Optional<InetSocketAddress> getBoundAddress() {
        if (this.shadow$getHostname() == null) {
            return Optional.empty();
        }
        return Optional.of(new InetSocketAddress(this.shadow$getHostname(), this.shadow$getPort()));
    }

    @Override
    public boolean isDedicatedServer() {
        return true;
    }
}

@@ -1391,32 +1391,171 @@
 red.api.Server;%0A
+import org.spongepowered.asm.mixin.Implements;%0Aimport org.spongepowered.asm.mixin.Interface;%0Aimport org.spongepowered.asm.mixin.Intrinsic;%0A
 import org.spong
@@ -1580,16 +1580,16 @@
 .Mixin;%0A
-
 import o
@@ -1796,16 +1796,82 @@
 .class)%0A
+@Implements(@Interface(iface = Server.class, prefix = %22server$%22))%0A
 public a
@@ -2069,16 +2069,80 @@
 tPort();
+%0A    @Shadow public abstract boolean shadow$isDedicatedServer();
 %0A%0A    @O
@@ -2413,32 +2413,33 @@
     %7D%0A%0A    @
-Override
+Intrinsic
 %0A    public 
@@ -2446,16 +2446,23 @@
 boolean 
+server$
 isDedica

Fix API implementation on DedicatedServer