Commit c3abd776 authored by Moritz Sokoll's avatar Moritz Sokoll 🦀
Browse files

ci and fixes in Loader.kt

parent be0b5e27
Pipeline #116 passed with stages
in 2 minutes and 4 seconds
image: openjdk:11-jdk
stages:
- test
- build
#- deploy
cache:
paths:
- build/libs/*.jar
test:
stage: test
script:
- ./gradlew test
tags:
- x86_64
build:
stage: build
script:
......@@ -17,3 +25,4 @@ build:
tags:
- x86_64
......@@ -18,19 +18,19 @@ import org.bukkit.scoreboard.DisplaySlot
import org.bukkit.scoreboard.Scoreboard
import java.sql.Time
import java.time.Instant
import java.io.File
public class Loader : JavaPlugin(), Listener, CommandExecutor {
override fun onEnable() {
Bukkit.getPluginManager().registerEvents(this, this)
}
var playermap: Map<String, Map<String, Any>> = mapOf()
@EventHandler
public fun joinEvent(event: PlayerJoinEvent) {
event.joinMessage = "§2>>§7 " + event.player.displayName
val players = Bukkit.getOnlinePlayers()
for (p in players) {
event.player.sendMessage("Currently there are " + players.size + " players online!")
}
event.player.sendMessage("Currently there are " + players.size + " players online!")
}
@EventHandler
......@@ -78,6 +78,38 @@ public class Loader : JavaPlugin(), Listener, CommandExecutor {
sender.setPlayerListName(sender.name)
sender.sendMessage("§4You are not nicked anymore!")
}
/*"friend" -> {
if (args.size < 1) {
sender.sendMessage("§4use §3/friend help§4 to view all commands tha belong to friend")
}
else {
when (args[0]) {
"help" -> {
sender.sendMessage("nothing here yet")
}
"add" -> {
if (args.size < 2) {
sender.sendMessage("please specify a player")
}
else {
var player = server.onlinePlayers.filter { it.name == args[1] }
if (player.size < 1) {
var player = server.offlinePlayers.filter { it.name == args[1] }
if (player.size < 1) {
sender.sendMessage("§4this player wasn't found in our seen players")
}
else {
this.playermap[args[1]]["firendrequests"]
}
}
else {
}
}
}
}
}
}*/
}
}
return true
......
......@@ -15,4 +15,7 @@ commands:
usage: /<command>
unnick:
description: unnicks the player
usage: /<command>
friend:
description: friend system u son
usage: /<command>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment