Skip to content

Commit

Permalink
Adicionado aviso para eventos com itens customizados.
Browse files Browse the repository at this point in the history
- Agora não é mais possível iniciar eventos com itens customizados caso a opção "Empty Inventory" esteja desativada.

Signed-off-by: Ars3ne <57549213+Ars3ne@users.noreply.github.com>
  • Loading branch information
Ars3ne committed Jul 14, 2021
1 parent 0cb5015 commit f7d4902
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/ars3ne/eventos/manager/EventosManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,24 @@ private boolean verify(YamlConfiguration config) {
break;
}

switch(EventoType.getEventoType(config.getString("Evento.Type"))) {
case SPLEEF: case BATATA_QUENTE: case GUERRA: case KILLER: case SEMAFORO: case FIGHT: case PAINTBALL: case HUNTER: case NEXUS: case SUMO:

if(!config.getBoolean("Evento.Empty inventory")) {

Bukkit.getConsoleSender().sendMessage(IridiumColorAPI.process(aEventos.getInstance().getConfig().getString("Messages.Require empty inventory")));

for(Player p: Bukkit.getOnlinePlayers()) {
if(!p.hasPermission("aeventos.admin")) continue;
p.sendMessage(IridiumColorAPI.process(aEventos.getInstance().getConfig().getString("Messages.Require empty inventory")));
}

return false;

}
break;
}

if(config.isSet("Itens.Enabled")) {

if(config.getBoolean("Itens.Enabled") && !config.getBoolean("Evento.Empty inventory")) {
Expand Down

0 comments on commit f7d4902

Please sign in to comment.