11/*
22 * This file is part of BukkitMimic.
3- * Copyright (C) 2020 Osip Fatkullin
4- * Copyright (C) 2020 EndlessCode Group and contributors
3+ * Copyright (C) 2021 Osip Fatkullin
4+ * Copyright (C) 2021 EndlessCode Group and contributors
55 *
66 * BukkitMimic is free software: you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ internal class LevelSystemSubcommand(
4545 @Description(" Show information about player's level system" )
4646 @CommandCompletion(" @players" )
4747 fun info (sender : CommandSender , @Optional @Flags(" other,defaultself" ) player : Player ) {
48- val system = systemProvider.get (player)
48+ val system = systemProvider.getSystem (player)
4949 sender.send(
5050 " &3System: &7${systemProvider.id} " ,
5151 " &3Level: &7%.2f" .format(system.level + system.fractionalExp),
@@ -64,8 +64,8 @@ internal class LevelSystemSubcommand(
6464 @Optional @Flags(" other,defaultself" ) player : Player
6565 ) {
6666 catchUnsupported {
67- val system = systemProvider.get (player)
68- @Suppress(" DEPRECATION" ) // Allow to use exp setter
67+ val system = systemProvider.getSystem (player)
68+ @Suppress(" DEPRECATION" ) // Allow using exp setter
6969 when (type) {
7070 ExtendedValueType .LVL -> system.level = amount.toInt()
7171 ExtendedValueType .TOTAL -> system.totalExp = amount
@@ -85,7 +85,7 @@ internal class LevelSystemSubcommand(
8585 @Optional @Flags(" other,defaultself" ) player : Player
8686 ) {
8787 catchUnsupported {
88- val system = systemProvider.get (player)
88+ val system = systemProvider.getSystem (player)
8989 when (type) {
9090 ValueType .LVL -> system.giveLevels(amount)
9191 ValueType .POINTS -> system.giveExp(amount.toDouble())
@@ -104,7 +104,7 @@ internal class LevelSystemSubcommand(
104104 @Optional @Flags(" other,defaultself" ) player : Player
105105 ) {
106106 catchUnsupported {
107- val system = systemProvider.get (player)
107+ val system = systemProvider.getSystem (player)
108108 when (type) {
109109 ValueType .LVL -> system.takeLevels(amount)
110110 ValueType .POINTS -> system.takeExp(amount.toDouble())
@@ -135,7 +135,7 @@ internal class LevelSystemSubcommand(
135135 @Default(" lvl" ) type : ExtendedValueType ,
136136 @Optional @Flags(" other,defaultself" ) player : Player
137137 ) {
138- val system = systemProvider.get (player)
138+ val system = systemProvider.getSystem (player)
139139 val has = when (type) {
140140 ExtendedValueType .LVL -> system.didReachLevel(value)
141141 ExtendedValueType .POINTS -> system.hasExp(value.toDouble())
0 commit comments