You could take out the `replace` call and make this one line... if you wanted:

```java
Bukkit.getOfflinePlayer(args[0]).setBanned(true, sender.getName(), reason.substring(0, reason.length()-1));
```