-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
75 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/de/dasphiller/smp/commands/WhitelistCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.dasphiller.smp.commands | ||
|
||
import net.axay.fabrik.commands.command | ||
import net.axay.fabrik.core.Fabrik | ||
import net.axay.fabrik.core.text.sendText | ||
|
||
val whitelistCommand = command("whitelist") { | ||
requiresPermissionLevel(4) | ||
literal("status") { | ||
runs { | ||
source.player?.sendText(if (Fabrik.currentServer?.playerList?.isUsingWhitelist!!) "true" else "false") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
package de.dasphiller.smp.mixins | ||
|
||
import de.dasphiller.smp.broadcast | ||
import net.minecraft.network.Connection | ||
import net.minecraft.network.chat.ChatType | ||
import net.minecraft.network.chat.Component | ||
import net.minecraft.network.chat.MutableComponent | ||
import net.minecraft.resources.ResourceKey | ||
import net.minecraft.server.level.ServerPlayer | ||
import net.minecraft.server.players.PlayerList | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo | ||
|
||
object PlayerMixinKt { | ||
fun onPlaceNewPlayer(instance: PlayerList) { | ||
broadcast("Willkommen ") | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"mixins": [ | ||
], | ||
"client": [ | ||
"ExampleMixin" | ||
"MainMixin" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
|