Skip to content

Commit f5d7de0

Browse files
committed
fix: some warning from compiler
1 parent 1180ba2 commit f5d7de0

File tree

20 files changed

+100
-96
lines changed

20 files changed

+100
-96
lines changed

src/main/java/be4rjp/sclat/api/SclatUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ object SclatUtil {
124124
commands.add(
125125
(
126126
"map " + Sclat.conf?.servers!!.getString("ServerName") + " " +
127-
DataMgr.getMapRandom(if (MatchMgr.mapcount == 0) 0 else MatchMgr.mapcount - 1)?.mapName!!
127+
DataMgr.getMapRandom(if (MatchMgr.mapcount == 0) 0 else MatchMgr.mapcount - 1).mapName!!
128128
),
129129
)
130130
commands.add("stop")

src/main/java/be4rjp/sclat/server/EquipmentServer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ internal class EquipEchoThread(
7777
EquipmentServerManager.addEquipmentCommand(cmd)
7878

7979
val args: Array<String?> = cmd!!.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
80-
when (args!![0]) {
80+
when (args[0]) {
8181
"setting" -> {
8282
// setting [settingData] [uuid]
8383
if (args.size == 3) {

src/main/java/be4rjp/sclat/server/EquipmentServerManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object EquipmentServerManager {
1818
for (cmd in commands) {
1919
val args: Array<String?> = cmd.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
2020

21-
when (args!![0]) {
21+
when (args[0]) {
2222
"set" -> {
2323
// add [statusName] [number or name] [uuid]
2424
if (args.size == 4) {

src/main/java/be4rjp/sclat/server/StatusServer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ internal class EchoThread(
8686

8787
val args: Array<String?> = cmd!!.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
8888

89-
if (args!![0] == "return" && args.size == 2) {
89+
if (args[0] == "return" && args.size == 2) {
9090
if (args[1]!!.length == 36) {
9191
PlayerReturnManager.addPlayerReturn(args[1])
9292
}

src/main/java/be4rjp/sclat/tutorial/Tutorial.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ object Tutorial {
211211
if (player.world !== w) continue
212212
if (player.location.distance(loc) < 8) {
213213
player.inventory.clear()
214-
getPlayerData(player)!!.isInMatch = false
214+
getPlayerData(player)!!.setIsInMatch(false)
215215
getPlayerData(player)!!.isJoined = false
216216
}
217217
}

src/main/java/be4rjp/sclat/weapon/Blaster.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ object Blaster {
103103
Gear.getGearInfluence(player, Gear.Type.MAIN_INK_EFFICIENCY_UP)
104104
).toFloat()
105105
val ball = player.launchProjectile<Snowball>(Snowball::class.java)
106-
(ball as CraftSnowball).handle.item = CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!))
106+
(ball as CraftSnowball).handle.setItem(CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!)))
107107
player.world.playSound(player.location, Sound.ENTITY_PIG_STEP, 0.3f, 1f)
108108
val vec =
109109
player

src/main/java/be4rjp/sclat/weapon/Brush.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ object Brush {
341341
Gear.getGearInfluence(player, Gear.Type.MAIN_INK_EFFICIENCY_UP)
342342
).toFloat()
343343
val ball = player.launchProjectile<Snowball>(Snowball::class.java)
344-
(ball as CraftSnowball).handle.item = CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!))
344+
(ball as CraftSnowball).handle.setItem(CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!)))
345345
var vec: Vector? =
346346
player
347347
.location

src/main/java/be4rjp/sclat/weapon/Bucket.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ object Bucket {
119119
Gear.getGearInfluence(player, Gear.Type.MAIN_INK_EFFICIENCY_UP)
120120
).toFloat()
121121
val ball = player.launchProjectile<Snowball>(Snowball::class.java)
122-
(ball as CraftSnowball).handle.item = CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!))
122+
(ball as CraftSnowball).handle.setItem(CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!)))
123123
var vec: Vector? =
124124
player
125125
.location

src/main/java/be4rjp/sclat/weapon/Burst.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ object Burst {
130130
PaintMgr.PaintHightestBlock(player.location, player, true, true)
131131

132132
val ball = player.launchProjectile<Snowball>(Snowball::class.java)
133-
(ball as CraftSnowball).handle.item = CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!))
133+
(ball as CraftSnowball).handle.setItem(CraftItemStack.asNMSCopy(ItemStack(getPlayerData(player)!!.team.teamColor!!.wool!!)))
134134
player.world.playSound(player.location, Sound.ENTITY_PIG_STEP, 0.3f, 1f)
135135
val vec =
136136
player

0 commit comments

Comments
 (0)