mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-26 04:05:56 +01:00
fix for /f disband causing NPE if you provided a bad (nonexistent) faction tag
This commit is contained in:
parent
4cc13707cc
commit
3f0d330d6e
@ -23,7 +23,7 @@ public class FCommandDisband extends FBaseCommand {
|
||||
if( parameters.size() > 0) {
|
||||
Faction faction = Faction.findByTag(parameters.get(0));
|
||||
|
||||
if( faction.getId() > 0 ) {
|
||||
if( faction != null && faction.getId() > 0 ) {
|
||||
me.sendMessage("Faction " + faction.getTag() + " got disbanded");
|
||||
Faction.delete( faction.getId() );
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user