Don't allow them to set the watcher willy nilly without verifiying it
This commit is contained in:
		@@ -632,6 +632,10 @@ public abstract class Disguise {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setWatcher(FlagWatcher newWatcher) {
 | 
			
		||||
        if (!getType().getWatcherClass().isInstance(newWatcher)) {
 | 
			
		||||
            throw new IllegalArgumentException(newWatcher.getClass().getSimpleName() + " is not a instance of "
 | 
			
		||||
                    + getType().getWatcherClass().getSimpleName() + " for DisguiseType " + getType().name());
 | 
			
		||||
        }
 | 
			
		||||
        watcher = newWatcher;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user