diff --git a/modules/ExpGamingAdmin/Ban/control.lua b/modules/ExpGamingAdmin/Ban/control.lua index 01bb8031..1d6fc330 100644 --- a/modules/ExpGamingAdmin/Ban/control.lua +++ b/modules/ExpGamingAdmin/Ban/control.lua @@ -22,8 +22,8 @@ local ThisModule = { } -- Function Define -AdminGui.add_button('ban','utility/danger_icon',{'ExpGamingAdmin.tooltip-ban'},function(player,byPlayer) - Admin.open(byPlayer,player,'ban') +AdminGui.add_button('Ban','utility/danger_icon',{'ExpGamingAdmin.tooltip-ban'},function(player,byPlayer) + Admin.open(byPlayer,player,'Ban') end) function Admin.ban(player,by_player,reason) diff --git a/modules/ExpGamingAdmin/Commands/control.lua b/modules/ExpGamingAdmin/Commands/control.lua index 18c3b1d2..c646accf 100644 --- a/modules/ExpGamingAdmin/Commands/control.lua +++ b/modules/ExpGamingAdmin/Commands/control.lua @@ -16,10 +16,10 @@ end) return { on_init = function(self) - if loaded_modules['ExpGamingAdmin.TempBan'] then verbose('ExpGamingAdmin.TempBan is installed; Loading tempban src') require(module_path..'/src/tempban',{Admin=Admin}) end - if loaded_modules['ExpGamingAdmin.Jail'] then verbose('ExpGamingAdmin.Jail is installed; Loading tempban src') require(module_path..'/src/jail',{Admin=Admin}) end - if loaded_modules['ExpGamingAdmin.Warnings'] then verbose('ExpGamingAdmin.Warnings is installed; Loading tempban src') require(module_path..'/src/warnings',{Admin=Admin}) end - if loaded_modules['ExpGamingAdmin.Reports'] then verbose('ExpGamingAdmin.Reports is installed; Loading tempban src') require(module_path..'/src/reports',{Admin=Admin}) end - if loaded_modules['ExpGamingAdmin.ClearInventory'] then verbose('ExpGamingAdmin.ClearInventory is installed; Loading tempban src') require(module_path..'/src/clear',{Admin=Admin}) end + if loaded_modules['ExpGamingAdmin.TempBan'] then verbose('ExpGamingAdmin.TempBan is installed; Loading tempban src') require(module_path..'/src/tempban',{self=Admin}) end + if loaded_modules['ExpGamingAdmin.Jail'] then verbose('ExpGamingAdmin.Jail is installed; Loading tempban src') require(module_path..'/src/jail',{self=Admin}) end + if loaded_modules['ExpGamingAdmin.Warnings'] then verbose('ExpGamingAdmin.Warnings is installed; Loading tempban src') require(module_path..'/src/warnings',{self=Admin}) end + if loaded_modules['ExpGamingAdmin.Reports'] then verbose('ExpGamingAdmin.Reports is installed; Loading tempban src') require(module_path..'/src/reports',{self=Admin}) end + if loaded_modules['ExpGamingAdmin.ClearInventory'] then verbose('ExpGamingAdmin.ClearInventory is installed; Loading tempban src') require(module_path..'/src/clear',{self=Admin}) end end } \ No newline at end of file diff --git a/modules/ExpGamingAdmin/Commands/src/clear.lua b/modules/ExpGamingAdmin/Commands/src/clear.lua index 000cd2bb..efb99637 100644 --- a/modules/ExpGamingAdmin/Commands/src/clear.lua +++ b/modules/ExpGamingAdmin/Commands/src/clear.lua @@ -1,4 +1,4 @@ -local Admin = Admin +local Admin = self --- Clears a players inventory and moves it to chests in spawn -- @command clear-inv diff --git a/modules/ExpGamingAdmin/Commands/src/jail.lua b/modules/ExpGamingAdmin/Commands/src/jail.lua index 7fba90bc..dd160d5d 100644 --- a/modules/ExpGamingAdmin/Commands/src/jail.lua +++ b/modules/ExpGamingAdmin/Commands/src/jail.lua @@ -1,5 +1,5 @@ -local Admin = Admin -local Role = require('ExpGamingCore.Role') +local Admin = self +local Role = require('ExpGamingCore.Role@^4.0.0') --- Used to jail a player which stops them from moving -- @command jail diff --git a/modules/ExpGamingAdmin/Commands/src/reports.lua b/modules/ExpGamingAdmin/Commands/src/reports.lua index f53b9939..a6cdb87b 100644 --- a/modules/ExpGamingAdmin/Commands/src/reports.lua +++ b/modules/ExpGamingAdmin/Commands/src/reports.lua @@ -1,4 +1,4 @@ -local Admin = Admin +local Admin = self local Role = require('ExpGamingCore.Role@^4.0.0') --- Reports a player diff --git a/modules/ExpGamingAdmin/Commands/src/tempban.lua b/modules/ExpGamingAdmin/Commands/src/tempban.lua index 79919bba..4fabd475 100644 --- a/modules/ExpGamingAdmin/Commands/src/tempban.lua +++ b/modules/ExpGamingAdmin/Commands/src/tempban.lua @@ -1,4 +1,4 @@ -local Admin = Admin +local Admin = self --- Used to temp ban a player and give a reason -- @command temp-ban diff --git a/modules/ExpGamingAdmin/Commands/src/warnings.lua b/modules/ExpGamingAdmin/Commands/src/warnings.lua index 277301a8..737df1c7 100644 --- a/modules/ExpGamingAdmin/Commands/src/warnings.lua +++ b/modules/ExpGamingAdmin/Commands/src/warnings.lua @@ -1,4 +1,4 @@ -local Admin = Admin +local Admin = self local Role = require('ExpGamingCore.Role@^4.0.0') --- Gives a warning to a player diff --git a/modules/ExpGamingAdmin/Gui/control.lua b/modules/ExpGamingAdmin/Gui/control.lua index dd63bd0e..ae6ea34f 100644 --- a/modules/ExpGamingAdmin/Gui/control.lua +++ b/modules/ExpGamingAdmin/Gui/control.lua @@ -131,7 +131,7 @@ local take_action = Gui.inputs{ local _role = Role.get_highest(_player) if role.index >= _role.index then dropdowns.warning.caption = {'ExpGamingAdmin.rank-high'} return end local _reason = dropdowns['reason-input-admin-commands'] and dropdowns['reason-input-admin-commands'].text - if (_action == 'Jail' or _action == 'Kick' or _action == 'Ban' or _action == 'Temp Ban') and (_reason == 'Enter Reason' or string.len(_reason) < 20) then return end + if (_action == 'Jail' or _action == 'Kick' or _action == 'Ban' or _action == 'Temp Ban') and (_reason == 'Enter Reason' or string.len(_reason) < 10) then return end Admin.take_action(_action,_player,event.player_index,_reason) Gui.center.clear(event) end) diff --git a/modules/ExpGamingAdmin/Jail/control.lua b/modules/ExpGamingAdmin/Jail/control.lua index 54c2c608..72adb0e5 100644 --- a/modules/ExpGamingAdmin/Jail/control.lua +++ b/modules/ExpGamingAdmin/Jail/control.lua @@ -24,7 +24,7 @@ local ThisModule = { -- Function Define AdminGui.add_button('jail','utility/clock',{'ExpGamingAdmin.tooltip-jail'},function(player,byPlayer) - Admin.open(byPlayer,player,'jail') + Admin.open(byPlayer,player,'Jail') end) function Admin.jail(player,by_player,reason) diff --git a/modules/ExpGamingAdmin/Kick/control.lua b/modules/ExpGamingAdmin/Kick/control.lua index ad191a75..103ecb54 100644 --- a/modules/ExpGamingAdmin/Kick/control.lua +++ b/modules/ExpGamingAdmin/Kick/control.lua @@ -21,8 +21,8 @@ local ThisModule = { end } -- Function Define -AdminGui.add_button('kick','utility/warning_icon',{'ExpGamingAdmin.tooltip-kick'},function(player,byPlayer) - Admin.open(byPlayer,player,'kick') +AdminGui.add_button('Kick','utility/warning_icon',{'ExpGamingAdmin.tooltip-kick'},function(player,byPlayer) + Admin.open(byPlayer,player,'Kick') end) function Admin.kick(player,by_player,reason) diff --git a/modules/ExpGamingAdmin/Teleport/control.lua b/modules/ExpGamingAdmin/Teleport/control.lua index ed685f2b..bfd0c7c1 100644 --- a/modules/ExpGamingAdmin/Teleport/control.lua +++ b/modules/ExpGamingAdmin/Teleport/control.lua @@ -14,10 +14,10 @@ local module_verbose = false local ThisModule = {} -- Function Define -AdminGui.add_button('goto','utility/export_slot',{'ExpGamingAdmin.tooltip-go-to'},function(player,byPlayer) +AdminGui.add_button('Go To','utility/export_slot',{'ExpGamingAdmin.tooltip-go-to'},function(player,byPlayer) Admin.go_to(player,byPlayer) end) -AdminGui.add_button('bring','utility/import_slot',{'ExpGamingAdmin.tooltip-bring'},function(player,byPlayer) +AdminGui.add_button('Bring','utility/import_slot',{'ExpGamingAdmin.tooltip-bring'},function(player,byPlayer) Admin.bring(player,byPlayer) end)