]> git.defcon.no Git - YAVote/commitdiff
More debug info.
authorJon Langseth <jon.langseth@hig.no>
Tue, 8 May 2012 14:13:12 +0000 (16:13 +0200)
committerJon Langseth <jon.langseth@hig.no>
Tue, 8 May 2012 14:13:12 +0000 (16:13 +0200)
src/no/defcon/yavote/Votemanager.java

index 78c059ab1d903451b10e77e361904ef217e6f3de..8690db30732d35f923b6af0f8a40948c136c96ba 100644 (file)
@@ -126,8 +126,14 @@ public class Votemanager {
                        cancelVote();\r
                        return;\r
                }\r
+\r
+               plugin.getLogger().info("Debugging: yesVoters.size()     = "  + yesVoters.size() );\r
+               plugin.getLogger().info("Debugging: getRequired()        = " + getRequired() );\r
+               plugin.getLogger().info("Debugging: getOnlinePlayers - 1 = " + (plugin.getServer().getOnlinePlayers().length - 1) );\r
+               plugin.getLogger().info("Debugging: ratio = " + ( (float) yesVoters.size() / (float) (plugin.getServer().getOnlinePlayers().length - 1) ) );\r
+\r
                //if( checkRatio( ) )\r
-               if ( ((float) yesVoters.size() / (float) plugin.getServer().getOnlinePlayers().length -1 ) >= getRequired() )\r
+               if ( ((float) yesVoters.size() / (float) (plugin.getServer().getOnlinePlayers().length - 1) ) >= getRequired() )\r
                {\r
                        plugin.getLogger().info("Debugging: after removing vote, ratio test returns TRUE, applying vote");\r
                        applyVote( voteType );\r