The issue is that you need to change
Code:
if(XboxController.button[0] == true)
to
Code:
if(XboxController.button[0].get() == true)
The key change there being the addition of ".get()". What your code is doing is saying "If this button is true, run my code". A button won't be equal to true because it's a Button, not a boolean. Using "XboxController.button[0].get()" changes that line of code to "If this button's STATE is true (pressed), run my code". This should fix your problem.