From f912c76ae68b06e662bf37d871c3c0105f5e36fd Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Tue, 17 Mar 2015 19:38:41 -0400 Subject: [PATCH] =?UTF-8?q?Correction=20de=20plusieurs=20bug=20relatif=20?= =?UTF-8?q?=C3=A0=20/modo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/plugin/pandacraftutils/commands/CommandModo.java | 8 ++++---- .../plugin/pandacraftutils/data_model/SQLElement.java | 3 ++- .../java/plugin/pandacraftutils/data_model/SQLTable.java | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/commands/CommandModo.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/commands/CommandModo.java index 548f5bd..f1621e4 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/commands/CommandModo.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/commands/CommandModo.java @@ -39,7 +39,7 @@ public class CommandModo extends AbstractCommandExecutor { // affichage de l'aide - if (args.length <= 1) { + if (args.length == 0 || args[0].matches("[0-9]+")) { int page = 1; @@ -75,7 +75,7 @@ public class CommandModo extends AbstractCommandExecutor { * jails */ - if (args.length >= 1 && args[0].equalsIgnoreCase("report")) { + if (args.length >= 1 && args[0].equalsIgnoreCase("jails")) { if (!(sender instanceof Player)) { @@ -242,7 +242,7 @@ public class CommandModo extends AbstractCommandExecutor { - + sender.sendMessage(ChatColor.RED+"Mauvaise utilisation de la commande : Faites "+ChatColor.GRAY+"/modo"+ChatColor.RED+" pour afficher l'aide."); return true; @@ -708,7 +708,7 @@ public class CommandModo extends AbstractCommandExecutor { s.add(ChatColor.GOLD+"- Commandes sans sanction :"); s.add(ChatColor.GRAY+"/modo report "+ChatColor.WHITE+" faire un rapport d'un joueur, sans appliquer de sanction"); s.add(ChatColor.GRAY+"/modo jails"+ChatColor.WHITE+" aller à la prison"); - s.add(ChatColor.GOLD+"- Aide sur les sanctions :"); + s.add(ChatColor.GOLD+"- Aide sur les commandes de sanction :"); s.add(ChatColor.GRAY+"/modo 2"+ChatColor.WHITE+" application d'une sanction"); s.add(ChatColor.GRAY+"/modo 3"+ChatColor.WHITE+" retrait d'une sanction"); s.add(ChatColor.GRAY+"/modo 4"+ChatColor.WHITE+" règles sur les sanctions"); diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLElement.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLElement.java index 858cc3b..cd3baf5 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLElement.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLElement.java @@ -7,11 +7,12 @@ import java.sql.Statement; import org.apache.commons.lang.StringUtils; +import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils; import net.mc_pandacraft.java.util.mysql.DBConnection; public abstract class SQLElement { - DBConnection db = null;//PandacraftUtils.getInstance().databaseConnection; + DBConnection db = PandacraftUtils.getInstance().databaseConnection; private boolean saved = false; diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLTable.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLTable.java index ba92582..59a5f16 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLTable.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/data_model/SQLTable.java @@ -6,11 +6,12 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.List; +import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils; import net.mc_pandacraft.java.util.mysql.DBConnection; public abstract class SQLTable { - DBConnection db = null;//PandacraftUtils.getInstance().databaseConnection; + DBConnection db = PandacraftUtils.getInstance().databaseConnection; protected final String tableName;